Skip to content

Commit

Permalink
fixed clamav.py datetime fromtimestamp function and update function p…
Browse files Browse the repository at this point in the history
…olicy
  • Loading branch information
Gabriel Chamon Araujo committed Oct 22, 2019
1 parent 81dbf23 commit 1705b92
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 1705b92

Please sign in to comment.