chg: [pep8] try/except # noqa

Not sure how to make flake happy on this one.
pull/299/head
Steve Clement 2019-05-02 11:44:32 +09:00 committed by GitHub
parent 9af06fd24c
commit 559ed786ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -72,7 +72,6 @@ def handler(q=False):
return misperrors
if sample_id > 0:
e = None
try:
api = VMRayRESTAPI(request["config"].get("url"), request["config"].get("apikey"), False)
vmray_results = {'results': []}
@ -130,7 +129,7 @@ def handler(q=False):
else:
misperrors['error'] = "Unable to fetch sample id %u" % (sample_id)
return misperrors
except Exception as e:
except Exception as e: # noqa
misperrors['error'] = "Unable to access VMRay API : %s" % (e)
return misperrors
else:
@ -174,7 +173,7 @@ def vmrayDownloadAnalysis(api, analysis_id):
try:
data = api.call("GET", "/rest/analysis/%u/archive/logs/summary.json" % (analysis_id), raw_data=True)
return json.loads(data.read().decode())
except Exception as e:
except Exception as e: # noqa
misperrors['error'] = "Unable to download summary.json for analysis %s" % (analysis_id)
return misperrors
else: