Fixed __query_virustotal return type

__query_virustotal returned a Response object and not the json expected; modified so that report_json is returned instead of report.
pull/562/head
DocArmoryTech 2020-04-06 10:46:15 +01:00 committed by GitHub
parent 12e05fd0ce
commit 4ee4db16fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -81,7 +81,7 @@ class VTReportObject(AbstractMISPObjectGenerator):
report = requests.get(url, params=params)
report_json = report.json()
if report_json["response_code"] == 1:
return report
return report_json
else:
error_msg = "{}: {}".format(resource, report_json["verbose_msg"])
raise InvalidMISPObject(error_msg)