mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-06 11:00:13 +02: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:
|
with open(outputfilename, 'w') as fp:
|
||||||
json.dump(response, fp, indent=2, sort_keys=True)
|
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 '
|
logging.warning(repofilename + ' has been flagged by virustotal '
|
||||||
+ str(response['positives']) + ' times:'
|
+ str(response['positives']) + ' times:'
|
||||||
+ '\n\t' + response['permalink'])
|
+ '\n\t' + response['permalink'])
|
||||||
|
Loading…
Reference in New Issue
Block a user