mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 23:10:29 +03:00
server: prevent crash when uploading to virustotal
This commit is contained in:
parent
7389947cc3
commit
b1bab81739
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue