[svn r57535] extending hacks for a safe representation of objects

to also work for broken __repr__s on newstyle classes.

--HG--
branch : trunk
This commit is contained in:
hpk
2008-08-21 11:48:46 +02:00
parent d5e61e470d
commit 5f666c99b7
3 changed files with 19 additions and 2 deletions

View File

@@ -153,7 +153,7 @@ class FormattedExcinfo(object):
else:
# This formatting could all be handled by the _repr() function, which is
# only repr.Repr in disguise, so is very configurable.
str_repr = safe_repr._repr(value)
str_repr = self._saferepr(value)
#if len(str_repr) < 70 or not isinstance(value,
# (list, tuple, dict)):
lines.append("%-10s = %s" %(name, str_repr))