[Python-checkins] python/dist/src/Lib cgitb.py,1.15,1.15.4.1

birkenfeld@users.sourceforge.net birkenfeld at users.sourceforge.net
Sun Jun 26 23:59:36 CEST 2005


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2907/Lib
Modified Files:
 Tag: release24-maint
	cgitb.py 
Log Message:
Backport: Prevent creating a HTML link to file://?/
Index: cgitb.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/cgitb.py,v
retrieving revision 1.15
retrieving revision 1.15.4.1
diff -u -d -r1.15 -r1.15.4.1
--- cgitb.py	18 Jul 2004 06:14:41 -0000	1.15
+++ cgitb.py	26 Jun 2005 21:59:34 -0000	1.15.4.1
@@ -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

AltStyle によって変換されたページ (->オリジナル) /