summaryrefslogtreecommitdiff
path: root/Lib/cgitb.py
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2010-04-01 18:17:09 +0000
committerFlorent Xicluna <florent.xicluna@gmail.com>2010-04-01 18:17:09 +0000
commit8d1da0f5c3b8c6e3fa29e6ae7f891f699a041bb6 (patch)
tree358d9d15191ea717dcd05117302d090296a4e9c1 /Lib/cgitb.py
parentb5023df3d6d46c7a220eb1db0c2db8cbe8a881fc (diff)
downloadcpython-git-8d1da0f5c3b8c6e3fa29e6ae7f891f699a041bb6.tar.gz
#7092: Fix some -3 warnings, and fix Lib/platform.py when the path contains a double-quote.
Diffstat (limited to 'Lib/cgitb.py')
-rw-r--r--Lib/cgitb.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/cgitb.py b/Lib/cgitb.py
index 35f4a50d5f..5becdf3653 100644
--- a/Lib/cgitb.py
+++ b/Lib/cgitb.py
@@ -99,8 +99,9 @@ def scanvars(reader, frame, locals):
lasttoken = token
return vars
-def html((etype, evalue, etb), context=5):
+def html(einfo, context=5):
"""Return a nice HTML document describing a given traceback."""
+ etype, evalue, etb = einfo
if type(etype) is types.ClassType:
etype = etype.__name__
pyver = 'Python ' + sys.version.split()[0] + ': ' + sys.executable
@@ -189,8 +190,9 @@ function calls leading up to the error, in the order they occurred.</p>'''
''' % pydoc.html.escape(
''.join(traceback.format_exception(etype, evalue, etb)))
-def text((etype, evalue, etb), context=5):
+def text(einfo, context=5):
"""Return a plain text document describing a given traceback."""
+ etype, evalue, etb = einfo
if type(etype) is types.ClassType:
etype = etype.__name__
pyver = 'Python ' + sys.version.split()[0] + ': ' + sys.executable