[Python-checkins] python/dist/src/Lib cgitb.py,1.16,1.17
birkenfeld@users.sourceforge.net
birkenfeld at users.sourceforge.net
Sun Jun 26 23:57:57 CEST 2005
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1941/Lib
Modified Files:
cgitb.py
Log Message:
Prevent creating a HTML link to file://?/
Index: cgitb.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/cgitb.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- cgitb.py 6 Feb 2005 06:57:07 -0000 1.16
+++ cgitb.py 26 Jun 2005 21:57:55 -0000 1.17
@@ -112,8 +112,11 @@
frames = []
records = inspect.getinnerframes(etb, context)
for frame, file, lnum, func, lines, index in records:
- file = file and os.path.abspath(file) or '?'
- link = '<a href="file://%s">%s</a>' % (file, pydoc.html.escape(file))
+ if file:
+ file = os.path.abspath(file)
+ link = '<a href="file://%s">%s</a>' % (file, pydoc.html.escape(file))
+ else:
+ file = link = '?'
args, varargs, varkw, locals = inspect.getargvalues(frame)
call = ''
if func != '?':
More information about the Python-checkins
mailing list