diff options
author | Georg Brandl <georg@python.org> | 2007-04-11 19:24:50 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2007-04-11 19:24:50 (GMT) |
commit | 57b39e0916d741d9851ac875d8f443bfc6005def (patch) | |
tree | 582159ea9ac83512264eb4ecb442f4bf19e7712f /Lib/cgitb.py | |
parent | b5ddcfd2a203336f3ba7bb1111cda462333c9e1f (diff) | |
download | cpython-57b39e0916d741d9851ac875d8f443bfc6005def.zip cpython-57b39e0916d741d9851ac875d8f443bfc6005def.tar.gz cpython-57b39e0916d741d9851ac875d8f443bfc6005def.tar.bz2 |
Bug #1697782: remove all remaining code that uses types.InstanceType.
Diffstat (limited to 'Lib/cgitb.py')
-rw-r--r-- | Lib/cgitb.py | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/Lib/cgitb.py b/Lib/cgitb.py index ae25cf1..19118ea 100644 --- a/Lib/cgitb.py +++ b/Lib/cgitb.py @@ -167,11 +167,10 @@ function calls leading up to the error, in the order they occurred.</p>''' exception = ['<p>%s: %s' % (strong(pydoc.html.escape(str(etype))), pydoc.html.escape(str(evalue)))] - if type(evalue) is types.InstanceType: - for name in dir(evalue): - if name[:1] == '_': continue - value = pydoc.html.repr(getattr(evalue, name)) - exception.append('\n<br>%s%s =\n%s' % (indent, name, value)) + for name in dir(evalue): + if name[:1] == '_': continue + value = pydoc.html.repr(getattr(evalue, name)) + exception.append('\n<br>%s%s =\n%s' % (indent, name, value)) import traceback return head + ''.join(frames) + ''.join(exception) + ''' @@ -239,10 +238,9 @@ function calls leading up to the error, in the order they occurred. frames.append('\n%s\n' % '\n'.join(rows)) exception = ['%s: %s' % (str(etype), str(evalue))] - if type(evalue) is types.InstanceType: - for name in dir(evalue): - value = pydoc.text.repr(getattr(evalue, name)) - exception.append('\n%s%s = %s' % (" "*4, name, value)) + for name in dir(evalue): + value = pydoc.text.repr(getattr(evalue, name)) + exception.append('\n%s%s = %s' % (" "*4, name, value)) import traceback return head + ''.join(frames) + ''.join(exception) + ''' |