[py-svn] r8511 - py/dist/py/code
hpk at codespeak.net
hpk at codespeak.net
Sun Jan 23 22:46:26 CET 2005
Author: hpk
Date: Sun Jan 23 22:46:26 2005
New Revision: 8511
Modified:
py/dist/py/code/excinfo.py
Log:
be a bit more careful if someone put msg=None on
an exception (apparently Christian got a strange
traceback which had this problem, well ...)
Modified: py/dist/py/code/excinfo.py
==============================================================================
--- py/dist/py/code/excinfo.py (original)
+++ py/dist/py/code/excinfo.py Sun Jan 23 22:46:26 2005
@@ -14,7 +14,7 @@
tup = sys.exc_info()
if exprinfo is None and isinstance(tup[1], py.magic.AssertionError):
exprinfo = tup[1].msg
- if exprinfo.startswith('assert '):
+ if exprinfo and exprinfo.startswith('assert '):
strip = 'AssertionError: '
self._excinfo = tup
self.type, self.value, tb = self._excinfo
More information about the pytest-commit
mailing list