-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autopopulate CopySourceSSECustomerKeyMD5 for s3 #709
Conversation
Looks good to me 🚢 |
return (params.get('SSECustomerKey') is not None and | ||
'SSECustomerKeyMD5' not in params) | ||
def _needs_s3_sse_customization(params, sse_member_prefix='SSECustomer'): | ||
return (params.get(sse_member_prefix+'Key') is not None and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we typically include spaces between operators
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm flake8 did not catch that. I am changing it, but for future references, there are some nuances to that rule in pep8 if you have multiple operators on the same line: https://www.python.org/dev/peps/pep-0008/#other-recommendations.
🚢 |
def _needs_s3_sse_customization(params): | ||
return (params.get('SSECustomerKey') is not None and | ||
'SSECustomerKeyMD5' not in params) | ||
def _needs_s3_sse_customization(params, sse_member_prefix='SSECustomer'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason this needs to have a default value if we're always providing it when we call _needs_s3_sse_customization
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nah we do not need a default. Just forgot to remove it upon implementation.
@jamesls I updated. Let me know what you think. |
Autopopulate CopySourceSSECustomerKeyMD5 for s3
This is implementing logic used for this PR: aws/aws-cli#1487. We have it for SSECustomer members but not the copy source one which may be needed when calling CopyObject.
cc @jamesls @mtdowling @rayluo @JordonPhillips