diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2003-05-13 18:14:25 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2003-05-13 18:14:25 (GMT) |
commit | ac6df95d07aa3951f8bfc6febce132e09850db73 (patch) | |
tree | 5bc66133d5d093e099b622ac3cd35e216f60a389 /Tools/scripts/fixdiv.py | |
parent | bf1bef820c5af6b0a9a60abe1564ac35f036fdcb (diff) | |
download | cpython-ac6df95d07aa3951f8bfc6febce132e09850db73.zip cpython-ac6df95d07aa3951f8bfc6febce132e09850db73.tar.gz cpython-ac6df95d07aa3951f8bfc6febce132e09850db73.tar.bz2 |
Fix use of 'file' as a variable name.
(I've tested the fixes, but please proofread anyway.)
Diffstat (limited to 'Tools/scripts/fixdiv.py')
-rwxr-xr-x | Tools/scripts/fixdiv.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Tools/scripts/fixdiv.py b/Tools/scripts/fixdiv.py index d05aa7c..70d5f19 100755 --- a/Tools/scripts/fixdiv.py +++ b/Tools/scripts/fixdiv.py @@ -164,8 +164,8 @@ def main(): return files.sort() exit = None - for file in files: - x = process(file, warnings[file]) + for filename in files: + x = process(filename, warnings[filename]) exit = exit or x return exit @@ -194,23 +194,23 @@ def readwarnings(warningsfile): if line.find("division") >= 0: sys.stderr.write("Warning: ignored input " + line) continue - file, lineno, what = m.groups() - list = warnings.get(file) + filename, lineno, what = m.groups() + list = warnings.get(filename) if list is None: - warnings[file] = list = [] + warnings[filename] = list = [] list.append((int(lineno), intern(what))) f.close() return warnings -def process(file, list): +def process(filename, list): print "-"*70 assert list # if this fails, readwarnings() is broken try: - fp = open(file) + fp = open(filename) except IOError, msg: sys.stderr.write("can't open: %s\n" % msg) return 1 - print "Index:", file + print "Index:", filename f = FileContext(fp) list.sort() index = 0 # list[:index] has been processed, list[index:] is still to do |