summaryrefslogtreecommitdiffstats
path: root/Lib/cgi.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-09-29 23:22:12 (GMT)
committerGuido van Rossum <guido@python.org>1997-09-29 23:22:12 (GMT)
commitf15d15964b6ac3e5ff71894707fbcff48bec45b2 (patch)
treee0fccf5a3756b03f3f0b2a265c65a175ffe61f09 /Lib/cgi.py
parentc90ad2103eb9aca14b7a910cbcdcd7b570f690ab (diff)
downloadcpython-f15d15964b6ac3e5ff71894707fbcff48bec45b2.zip
cpython-f15d15964b6ac3e5ff71894707fbcff48bec45b2.tar.gz
cpython-f15d15964b6ac3e5ff71894707fbcff48bec45b2.tar.bz2
Use sys.exc_info() where needed.
Diffstat (limited to 'Lib/cgi.py')
-rwxr-xr-xLib/cgi.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/cgi.py b/Lib/cgi.py
index 388e440..fb3076c 100755
--- a/Lib/cgi.py
+++ b/Lib/cgi.py
@@ -1210,7 +1210,7 @@ def test(environ=os.environ):
def print_exception(type=None, value=None, tb=None, limit=None):
if type is None:
- type, value, tb = sys.exc_type, sys.exc_value, sys.exc_traceback
+ type, value, tb = sys.exc_info()
import traceback
print
print "<H3>Traceback (innermost last):</H3>"
@@ -1220,6 +1220,7 @@ def print_exception(type=None, value=None, tb=None, limit=None):
escape(string.join(list[:-1], "")),
escape(list[-1]),
)
+ del tb
def print_environ(environ=os.environ):
"""Dump the shell environment as HTML."""