Message125054
traceback.print_exception() will throw an AttributeException if `value` is None and `chain` is True. This is because `_iter_chain` assumes that the exception object has a `__cause__` attribute. You can trigger this by trying for format a non-existent exception:
>>> import logging, sys
>>> logging.Formatter().formatException(sys.exc_info())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.1/logging/__init__.py", line 418, in formatException
traceback.print_exception(ei[0], ei[1], ei[2], None, sio)
File "/usr/lib/python3.1/traceback.py", line 155, in print_exception
for value, tb in values:
File "/usr/lib/python3.1/traceback.py", line 122, in _iter_chain
cause = exc.__cause__
This is assuming that sys.exc_info() returns (None, None, None). |
|
Date |
User |
Action |
Args |
2011-01-02 14:23:51 | abingham | set | recipients:
+ abingham |
2011-01-02 14:23:51 | abingham | set | messageid: <1293978231.38.0.946265028499.issue10805@psf.upfronthosting.co.za> |
2011-01-02 14:23:48 | abingham | link | issue10805 messages |
2011-01-02 14:23:48 | abingham | create | |
|