fix: Catch QuotaExceededError in VT module

pull/564/head
Raphaël Vinot 2022-12-26 23:30:00 +01:00
parent 1abd97f37a
commit 02497e167c
1 changed files with 7 additions and 1 deletions

View File

@ -81,7 +81,13 @@ class VirusTotal():
scan_requested = False
if self.autosubmit and force:
self.client.scan_url(url)
try:
self.client.scan_url(url)
except APIError as e:
if e.code == 'QuotaExceededError':
self.logger.warning('VirusTotal quota exceeded, sry.')
return
self.logger.exception('Something went poorly withi this query.')
scan_requested = True
if not force and vt_file.exists():