Exceptions in Python 3 no longer contain a msg attribute. Instead the exception message is accessible from the exception object directly.
In order to maintain Python 2 support, attempt to fetch the message from e.msg and use str(e) as a default if the attribute does not exist.
I was going to add a test for this but I saw all the existing tests are currently commented out. I figured you were likely doing some refactoring and hadn't gotten to the tests yet. Perhaps you are already fixing this issue as part of your work as well. Regardless, I thought I'd throw up a PR in case it is useful to you.
Going to close this since it's not the right approach and there hasn't been any activity. We have issue #28 to remind us of the bug. Please feel free to reopen if you update the branch.
Exceptions in Python 3 no longer contain a
msg
attribute. Instead the exception message is accessible from the exception object directly.In order to maintain Python 2 support, attempt to fetch the message from
e.msg
and usestr(e)
as a default if the attribute does not exist.I was going to add a test for this but I saw all the existing tests are currently commented out. I figured you were likely doing some refactoring and hadn't gotten to the tests yet. Perhaps you are already fixing this issue as part of your work as well. Regardless, I thought I'd throw up a PR in case it is useful to you.
Fixes #28