diff Lib/cgitb.py @ 60132:a404e3702f79 legacy-trunk

#7092: Fix some -3 warnings, and fix Lib/platform.py when the path contains a double-quote.
author Florent Xicluna <florent.xicluna@gmail.com>
date Thu, 01 Apr 2010 18:17:09 +0000
parents a16a0456978f
children b36cb4602e21
line wrap: on
line diff
--- a/Lib/cgitb.py	Thu Apr 01 17:56:57 2010 +0000
+++ b/Lib/cgitb.py	Thu Apr 01 18:17:09 2010 +0000
@@ -99,8 +99,9 @@
         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 @@
 ''' % 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