From: Andrew M. Kuchling Date: Sat, 5 Jun 2004 19:17:51 +0000 (+0000) Subject: [Bug #758665] cgitb.scanvars() fails because of an unititialized value variable.... X-Git-Tag: v2.3.5c1~218 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7564d5d3ecd10651ff001394d9a004249bb7f5af;p=thirdparty%2FPython%2Fcpython.git [Bug #758665] cgitb.scanvars() fails because of an unititialized value variable. Patch from Robin Becker. --- diff --git a/Lib/cgitb.py b/Lib/cgitb.py index 1f03da7154e8..d35976ae8713 100644 --- a/Lib/cgitb.py +++ b/Lib/cgitb.py @@ -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: