Skip to content

Commit

Permalink
Not interested in adding the same file as a child of itself
Browse files Browse the repository at this point in the history
  • Loading branch information
cccs-rs committed Aug 31, 2022
1 parent 085ebab commit de74af6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions urldownloader/urldownloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,9 @@ def execute(self, request: ServiceRequest) -> None:
fp, sha256 = self.fetch_uri(tag_value, headers=headers)
if isinstance(fp, str):
self.log.info(f'Success, writing to {fp}...')
request.add_extracted(fp, tag_value, f"Response from {tag_value}",
safelist_interface=self.api_interface)
if sha256 != request.sha256:
request.add_extracted(fp, tag_value, f"Response from {tag_value}",
safelist_interface=self.api_interface)
else:
self.log.debug(f'Server response except occurred: {fp.reason}')
exception_table.add_row(TableRow({'URI': tag_value, 'REASON': fp.reason}))
Expand Down

0 comments on commit de74af6

Please sign in to comment.