-
Notifications
You must be signed in to change notification settings - Fork 4
Fix a bug with bytes in py3 #13
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
Conversation
91711c0 to
58434a6
Compare
tests/unit/kmsauth/kmsauth_test.py
Outdated
| kms_mock = MagicMock() | ||
| kms_mock.encrypt = MagicMock( | ||
| return_value={'CiphertextBlob': 'encrypted'} | ||
| return_value={'CiphertextBlob': six.b('encrypted')} |
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.
No need for syx.b here, just prefix with b
58434a6 to
7d242bf
Compare
kmsauth/__init__.py
Outdated
| PY2 = sys.version[0] == '2' | ||
|
|
||
|
|
||
| def ensure_str(str_or_bytes, encoding='utf-8'): |
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.
ensure_textis a better name for this- why not
errorsparameter here as well?
tests/unit/kmsauth/kmsauth_test.py
Outdated
| import datetime | ||
| import json | ||
|
|
||
| import six |
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.
six imported but unused
kmsauth/__init__.py
Outdated
|
|
||
| TOKEN_SKEW = 3 | ||
| TIME_FORMAT = "%Y%m%dT%H%M%SZ" | ||
| PY2 = sys.version[0] == '2' |
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.
this constant is unused now
No description provided.