Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 26f6bdf

Browse files
committedJun 5, 2004
[Bug #758665] cgitb.scanvars() fails because of an unititialized value variable. Patch from Robin Becker.
1 parent 94afd3e commit 26f6bdf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎Lib/cgitb.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def lookup(name, frame, locals):
6060
def scanvars(reader, frame, locals):
6161
"""Scan one logical line of Python and look up values of variables used."""
6262
import tokenize, keyword
63-
vars, lasttoken, parent, prefix = [], None, None, ''
63+
vars, lasttoken, parent, prefix, value = [], None, None, '', __UNDEF__
6464
for ttype, token, start, end, line in tokenize.generate_tokens(reader):
6565
if ttype == tokenize.NEWLINE: break
6666
if ttype == tokenize.NAME and token not in keyword.kwlist:

0 commit comments

Comments
 (0)
Please sign in to comment.