Skip to content

Commit

Permalink
Merge pull request #116 from CybercentreCanada/persistent-service-update
Browse files Browse the repository at this point in the history
fix params
  • Loading branch information
cccs-rs authored Sep 24, 2021
2 parents 7074929 + 5bb9f2a commit 3d1ef3a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions assemblyline_result_sample_service/update_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,14 @@ def do_source_update(self, service: Service) -> None:
# Go through each source and download file
for source_name, source_obj in sources.items():
source = source_obj.as_primitives()
uri: str = source['uri']
cache_name = f"{source_name}.zip"
source_default_classification[source_name] = source.get('default_classification',
classification.UNRESTRICTED)
self.log.info(f"Processing source: {source['name'].upper()}")
extracted_path = os.path.join(UPDATE_DIR, source['name'])

try:
url_download(uri, extracted_path, self.log, previous_update=old_update_time)
url_download(source, previous_update=old_update_time, logger=self.log, output_dir=extracted_path)
except SkipSource:
if cache_name in previous_hashes:
files_sha256[cache_name] = previous_hashes[cache_name]
Expand Down

0 comments on commit 3d1ef3a

Please sign in to comment.