Skip to content

Commit

Permalink
Merge pull request #112 from CybercentreCanada/persistent-service-update
Browse files Browse the repository at this point in the history
pass on SkipSource exception
  • Loading branch information
cccs-rs authored Sep 24, 2021
2 parents ad2c025 + c8db11a commit f94dbb0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions assemblyline_v4_service/updater/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,13 @@ def url_download(source: Dict[str, Any], previous_update: int = None,
else:
return [(file_path, get_sha256_for_file(file_path))]

except requests.Timeout:
# TODO: should we retry?
pass
except SkipSource:
# Raise to calling function for handling
raise
except Exception as e:
# Catch all other types of exceptions such as ConnectionError, ProxyError, etc.
logger.info(str(e))
logger.warning(str(e))
exit()
# TODO: Should we exit even if one file fails to download? Or should we continue downloading other files?
finally:
# Close the requests session
session.close()
Expand Down

0 comments on commit f94dbb0

Please sign in to comment.