mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-14 02:50:12 +01:00
server: prevent crash when uploading to virustotal
This commit is contained in:
parent
7389947cc3
commit
b1bab81739
@ -513,7 +513,7 @@ def upload_to_virustotal(repo_section, vt_apikey):
|
||||
with open(outputfilename, 'w') as fp:
|
||||
json.dump(response, fp, indent=2, sort_keys=True)
|
||||
|
||||
if response.get('positives') > 0:
|
||||
if response.get('positives', 0) > 0:
|
||||
logging.warning(repofilename + ' has been flagged by virustotal '
|
||||
+ str(response['positives']) + ' times:'
|
||||
+ '\n\t' + response['permalink'])
|
||||
|
Loading…
Reference in New Issue
Block a user