diff options
author | Georg Brandl <georg@python.org> | 2007-04-11 19:25:11 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2007-04-11 19:25:11 (GMT) |
commit | 135c3174e7edbb2e01fabacfd5e015e49b640efd (patch) | |
tree | f8ac44616be594a939132c59ee9c241628c14c96 /Lib | |
parent | 13936697f60feedd560d16c94e2524453bb1255a (diff) | |
download | cpython-135c3174e7edbb2e01fabacfd5e015e49b640efd.zip cpython-135c3174e7edbb2e01fabacfd5e015e49b640efd.tar.gz cpython-135c3174e7edbb2e01fabacfd5e015e49b640efd.tar.bz2 |
Exceptions are no longer old-style instances. Fix accordingly.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/cgitb.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/cgitb.py b/Lib/cgitb.py index ae25cf1..1c300b2 100644 --- a/Lib/cgitb.py +++ b/Lib/cgitb.py @@ -167,7 +167,7 @@ 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: + if isinstance(evalue, BaseException): for name in dir(evalue): if name[:1] == '_': continue value = pydoc.html.repr(getattr(evalue, name)) @@ -239,7 +239,7 @@ 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: + if isinstance(evalue, BaseException): for name in dir(evalue): value = pydoc.text.repr(getattr(evalue, name)) exception.append('\n%s%s = %s' % (" "*4, name, value)) |