]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[Bug #758665] cgitb.scanvars() fails because of an unititialized value variable....
authorAndrew M. Kuchling <amk@amk.ca>
Sat, 5 Jun 2004 19:17:51 +0000 (19:17 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Sat, 5 Jun 2004 19:17:51 +0000 (19:17 +0000)
Lib/cgitb.py

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