Merge lp:~brian.curtin/ubuntuone-dev-tools/py3-exception-message into lp:ubuntuone-dev-tools
Proposed by
Brian Curtin
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Roberto Alsina | ||||
Approved revision: | 97 | ||||
Merged at revision: | 96 | ||||
Proposed branch: | lp:~brian.curtin/ubuntuone-dev-tools/py3-exception-message | ||||
Merge into: | lp:ubuntuone-dev-tools | ||||
Diff against target: |
11 lines (+2/-2) 1 file modified
ubuntuone/devtools/services/tests/test_squid.py (+2/-2) |
||||
To merge this branch: | bzr merge lp:~brian.curtin/ubuntuone-dev-tools/py3-exception-message | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Roberto Alsina (community) | Approve | ||
Review via email: mp+123151@code.launchpad.net |
Commit message
- Remove usage of Exception.message as it was deprecated and removed from Python 3. Check the exception's "args" attribute for the message.
Description of the change
Python 2.6 deprecated and Python 3 removed the message attribute of Exception objects, so we need to test for inclusion in the string message via other means.
Exception objects store the message in the args attribute which is a tuple, so testing for our strings inside of the tuple will work. The change tests if any of the args find a match for our string.
To post a comment you must log in.