Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Commit

Permalink
Need to convert to a boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Gilmer committed Sep 9, 2019
1 parent 367eff0 commit ecb2f84
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,16 @@ def sns_start_scan(s3_object):
MessageStructure="json"
)


def sns_scan_results(s3_object, result):
# Don't publish if SNS ARN has been supplied
if AV_STATUS_SNS_ARN is None:
return
# Don't publish if result is CLEAN and CLEAN results should not be published
if result == AV_STATUS_CLEAN and not AV_STATUS_SNS_PUBLISH_CLEAN:
if result == AV_STATUS_CLEAN and not str_to_bool(AV_STATUS_SNS_PUBLISH_CLEAN):
return
# Don't publish if result is INFECTED and INFECTED results should not be published
if result == AV_STATUS_INFECTED and not AV_STATUS_SNS_PUBLISH_INFECTED:
if result == AV_STATUS_INFECTED and not str_to_bool(AV_STATUS_SNS_PUBLISH_INFECTED):
return
message = {
"bucket": s3_object.bucket_name,
Expand Down

0 comments on commit ecb2f84

Please sign in to comment.