diff options
| author | Florent Xicluna <florent.xicluna@gmail.com> | 2010-04-01 18:17:09 (GMT) |
|---|---|---|
| committer | Florent Xicluna <florent.xicluna@gmail.com> | 2010-04-01 18:17:09 (GMT) |
| commit | 8d1da0f5c3b8c6e3fa29e6ae7f891f699a041bb6 (patch) | |
| tree | 358d9d15191ea717dcd05117302d090296a4e9c1 /Lib/cgitb.py | |
| parent | b5023df3d6d46c7a220eb1db0c2db8cbe8a881fc (diff) | |
| download | cpython-8d1da0f5c3b8c6e3fa29e6ae7f891f699a041bb6.zip cpython-8d1da0f5c3b8c6e3fa29e6ae7f891f699a041bb6.tar.gz cpython-8d1da0f5c3b8c6e3fa29e6ae7f891f699a041bb6.tar.bz2 | |
#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.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/cgitb.py b/Lib/cgitb.py index 35f4a50..5becdf3 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 |
