[svn r45483] Fix 2.5 issue when str(excinfo.type) produced different thing than expected

--HG--
branch : trunk
This commit is contained in:
fijal 2007-08-04 16:24:37 +02:00
parent 8cbb41521c
commit a916b74c71
1 changed files with 3 additions and 0 deletions

View File

@ -19,6 +19,9 @@ class ExceptionInfo(object):
self._excinfo = tup self._excinfo = tup
self.type, self.value, tb = self._excinfo self.type, self.value, tb = self._excinfo
self.typename = str(self.type) self.typename = str(self.type)
if issubclass(self.type, object):
# cpy 2.5
self.typename = self.typename[7:-2]
self.traceback = py.code.Traceback(tb) self.traceback = py.code.Traceback(tb)
def exconly(self, tryshort=False): def exconly(self, tryshort=False):