Closed ecordell closed 8 years ago
If a token is a bytes object, deserializing throws an unhelpful error:
>>> Macaroon.deserialize(token) Traceback (most recent call last): File "<console>", line 1, in <module> File "/usr/local/lib/python3.4/dist-packages/pymacaroons/macaroon.py", line 40, in deserialize return serializer.deserialize(serialized) File "/usr/local/lib/python3.4/dist-packages/pymacaroons/serializers/binary_serializer.py", line 42, in deserialize serialized + "=" * (-len(serialized) % 4) TypeError: can't concat bytes to str
Instead, it should accept either bytes or a string.
Submitted a PR for this issue: https://github.com/ecordell/pymacaroons/pull/19
If a token is a bytes object, deserializing throws an unhelpful error:
Instead, it should accept either bytes or a string.