Skip to content

Commit

Permalink
Fix use of deprecated Exception.message in Python 3. Close #75. Fix #72.
Browse files Browse the repository at this point in the history
  • Loading branch information
erikrose committed Jan 31, 2018
2 parents b403ce6 + ea94bd3 commit 9b7e333
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -4,3 +4,4 @@
.tox
*.egg-info/
.*.swp
build
3 changes: 2 additions & 1 deletion noseprogressive/result.py
Expand Up @@ -148,7 +148,8 @@ def addSkip(self, test, reason):
self._recordAndPrintHeadline(test, SkipTest, reason)
# Python 2.7 users get a little bonus: the reason the test was skipped.
if isinstance(reason, Exception):
reason = reason.message
reason = getattr(reason, 'message', None) or getattr(
reason, 'args')[0]
if reason and self._options.show_advisories:
with self.bar.dodging():
self.stream.writeln(reason)
Expand Down

0 comments on commit 9b7e333

Please sign in to comment.