[ python-Bugs-966992 ] cgitb.scanvars fails
SourceForge.net
noreply at sourceforge.net
Sat Jun 5 04:59:28 EDT 2004
Bugs item #966992, was opened at 2004-06-05 08:59
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=966992&group_id=5470
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Robin Becker (rgbecker)
Assigned to: Nobody/Anonymous (nobody)
Summary: cgitb.scanvars fails
Initial Comment:
Under certain circumstances cgitb.scanvars fails with
because of an unititialized value variable. This bug is
present in 2.3.3 and 2.4a0.
The following script demonstrates
#####start
import cgitb;cgitb.enable()
def err(L):
if 'never' in L:
return
if 1: print '\n'.join(L)
v=2
err(['',None])
#####finish
when run this results in mangled output because scanvars
attempts to evaluate '\n'.join(L) where L=['',None]. A
fix is to set value=__UNDEF__ at the start of scanvars.
Index: cgitb.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/cgitb.py,v
retrieving revision 1.11
diff -r1.11 cgitb.py
63c63
< vars, lasttoken, parent, prefix = [], None, None, ''
---
> vars, lasttoken, parent, prefix, value = [],
None, None, '', __UNDEF__
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=966992&group_id=5470
More information about the Python-bugs-list
mailing list