diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2003-05-13 14:51:39 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2003-05-13 14:51:39 (GMT) |
commit | 47172b4fabf60d047b904d662fd09fc2cd935502 (patch) | |
tree | b9f5c6221136bde886d90c388a4e6d619a0044b6 /Tools | |
parent | c85bf582769909c421c6205e83bd0ef2cc3fa8ae (diff) | |
download | cpython-47172b4fabf60d047b904d662fd09fc2cd935502.zip cpython-47172b4fabf60d047b904d662fd09fc2cd935502.tar.gz cpython-47172b4fabf60d047b904d662fd09fc2cd935502.tar.bz2 |
[Bug #724767] crlf.py uses the variable name file, which it shouldn't anymore.
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/scripts/crlf.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Tools/scripts/crlf.py b/Tools/scripts/crlf.py index 59e3ff3..4fb8be3 100755 --- a/Tools/scripts/crlf.py +++ b/Tools/scripts/crlf.py @@ -3,17 +3,17 @@ "Replace CRLF with LF in argument files. Print names of changed files." import sys, 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 = data.replace("\r\n", "\n") if newdata != data: - print file - f = open(file, "wb") + print filename + f = open(filename, "wb") f.write(newdata) f.close() |