ede68f08d3
In Python 2, the 'b64decode' function calls the 'binascii.a2b_base64' function but catches any 'binascii.Error' exceptions raised and raises a TypeError instead [1]. In Python 3, a 'binascii.Error' error is raised instead [2]. Rather than forcing users to handle two types of exception, we can allow them to catch only the 'bisascii.Error'. Python 2 provides a function that does just this - 'decodestring' - which we can use. Make it so. [1] https://github.com/python/cpython/blob/2.7/Lib/base64.py#L78 [2] https://github.com/python/cpython/blob/3.5/Lib/base64.py#L87 [3] https://github.com/python/cpython/blob/2.7/Lib/base64.py#L326 Change-Id: I72c6de71b174181292427128d20e03756f85fb97 |
||
---|---|---|
.. | ||
__init__.py | ||
test_base64.py | ||
test_jsonutils.py | ||
test_msgpackutils.py |