Skip to content

Commit

Permalink
Merge pull request #114 from CybercentreCanada/update/log-host
Browse files Browse the repository at this point in the history
Update/log host [dev]
  • Loading branch information
cccs-kevin authored Aug 4, 2023
2 parents f59a277 + e61fb9f commit 34e05c1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions antivirus.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,12 @@ def parse_scan_result(
virus_name: Optional[str] = None
av_hits: list[AvHitSection] = []

_status_code, _status_message, headers = self.client.parse_headers(
av_results, check_body_for_headers=self.scan_details.check_body_for_headers)
try:
_status_code, _status_message, headers = self.client.parse_headers(
av_results, check_body_for_headers=self.scan_details.check_body_for_headers)
except ValueError as e:
# Raise up which host caused the error
raise ValueError(f"{av_name} host {self.client.host.ip}:{self.client.host.port} - {e}")

if self.virus_header_pattern is not None:
for header, value in headers.items():
Expand Down

0 comments on commit 34e05c1

Please sign in to comment.