With 2.5, exceptions became new-style. Unfortunately,
the traceback module wasn't fully updated to still
properly handle all (admittedly deprecated) string
exceptions. I noticed this because of its affect on
unittest, where the original exception was masked.
Under 2.4.3:
>>> import traceback
>>> traceback.format_exception_only("strtype",
"strvalue")
['strtype: strvalue\n']
Under 2.5b1:
>>> import traceback
>>> traceback.format_exception_only("strtype",
"strvalue")
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
traceback.format_exception_only("strtype",
"strvalue")
File "C:\Python25\lib\traceback.py", line 168, in
format_exception_only
if issubclass(etype, SyntaxError):
TypeError: issubclass() arg 1 must be a class
I will also be entering a patch, but know that we need
a bug number at this stage.
|