diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2003-05-13 17:09:01 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2003-05-13 17:09:01 (GMT) |
commit | 87ddce1bf05d81cca1ecae476ce3f7873fbeea7b (patch) | |
tree | c952382dd252882ba857e661694f66d03853f9c2 /Tools | |
parent | 2398d578a367aa0f9155afb7275a5aec4e5caef9 (diff) | |
download | cpython-87ddce1bf05d81cca1ecae476ce3f7873fbeea7b.zip cpython-87ddce1bf05d81cca1ecae476ce3f7873fbeea7b.tar.gz cpython-87ddce1bf05d81cca1ecae476ce3f7873fbeea7b.tar.bz2 |
[Bug #724767] Avoid use of 'file' as a variable name
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/scripts/lfcr.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Tools/scripts/lfcr.py b/Tools/scripts/lfcr.py index 5f67fe0..3baac97 100755 --- a/Tools/scripts/lfcr.py +++ b/Tools/scripts/lfcr.py @@ -3,17 +3,17 @@ "Replace LF with CRLF in argument files. Print names of changed files." import sys, re, os -for file in sys.argv[1:]: - if os.path.isdir(file): - print file, "Directory!" +for filename in sys.argv[1:]: + if os.path.isdir(filename): + print filename, "Directory!" continue - data = open(file, "rb").read() + data = open(filename, "rb").read() if '\0' in data: - print file, "Binary!" + print filename, "Binary!" continue newdata = re.sub("\r?\n", "\r\n", data) if newdata != data: - print file - f = open(file, "wb") + print filename + f = open(filename, "wb") f.write(newdata) f.close() |