Skip to content

Commit

Permalink
Merge pull request bluesentry#93 from gchamon/fix/update-function-fir…
Browse files Browse the repository at this point in the history
…st-run

fixed clamav.py datetime fromtimestamp function and update policy
  • Loading branch information
Chris Gilmer authored Oct 24, 2019
2 parents 81dbf23 + 1705b92 commit 7aa1471
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,14 @@ following policy document
"s3:GetObjectTagging",
"s3:PutObject",
"s3:PutObjectTagging",
"s3:PutObjectVersionTagging"
"s3:PutObjectVersionTagging",
"s3:ListBucket"
],
"Effect":"Allow",
"Resource":"arn:aws:s3:::<bucket-name>/*"
"Resource":[
"arn:aws:s3:::<bucket-name>",
"arn:aws:s3:::<bucket-name>/*"
]
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion clamav.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def time_from_s3(s3_client, bucket, key):
except botocore.exceptions.ClientError as e:
expected_errors = {"404", "AccessDenied", "NoSuchKey"}
if e.response["Error"]["Code"] in expected_errors:
return datetime.fromtimestamp(0, utc)
return datetime.datetime.fromtimestamp(0, utc)
else:
raise
return time
Expand Down

0 comments on commit 7aa1471

Please sign in to comment.