From 559ed786ba95c743a87582c233fe8e4d77d5ece3 Mon Sep 17 00:00:00 2001 From: Steve Clement Date: Thu, 2 May 2019 11:44:32 +0900 Subject: [PATCH] chg: [pep8] try/except # noqa Not sure how to make flake happy on this one. --- misp_modules/modules/import_mod/vmray_import.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/misp_modules/modules/import_mod/vmray_import.py b/misp_modules/modules/import_mod/vmray_import.py index 8b79838..936ab98 100644 --- a/misp_modules/modules/import_mod/vmray_import.py +++ b/misp_modules/modules/import_mod/vmray_import.py @@ -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: