diff options
author | John Szakmeister <john@szakmeister.net> | 2014-04-18 16:05:21 -0400 |
---|---|---|
committer | John Szakmeister <john@szakmeister.net> | 2014-04-18 16:05:21 -0400 |
commit | 4b2ad757e3ba22badde0e964d8e9bbb4e51b5105 (patch) | |
tree | caf5b0dbf5d2d7cf232edbb78530b12698865837 | |
parent | 2e0275500c49b0227c564772fe41e99d21392026 (diff) | |
download | nose-4b2ad757e3ba22badde0e964d8e9bbb4e51b5105.tar.gz |
Fix a traceback when using string exceptions.
We need to check that the first argument to `issubclass()` is a class
before using it, since we have the possibility that it's a string.
-rw-r--r-- | nose/result.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nose/result.py b/nose/result.py index 1267ba2..f974a14 100644 --- a/nose/result.py +++ b/nose/result.py @@ -180,7 +180,7 @@ class TextTestResult(_TextTestResult): def _exc_info_to_string(self, err, test=None): # 2.7 skip compat from nose.plugins.skip import SkipTest - if issubclass(err[0], SkipTest): + if isclass(err[0]) and issubclass(err[0], SkipTest): return str(err[1]) # 2.3/2.4 -- 2.4 passes test, 2.3 does not try: |