Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 47172b4

Browse files
committed
[Bug #724767] crlf.py uses the variable name file, which it shouldn't anymore.
1 parent c85bf58 commit 47172b4

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

Tools/scripts/crlf.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
"Replace CRLF with LF in argument files. Print names of changed files."
44

55
import sys, os
6-
for file in sys.argv[1:]:
7-
if os.path.isdir(file):
8-
print file, "Directory!"
6+
for filename in sys.argv[1:]:
7+
if os.path.isdir(filename):
8+
print filename, "Directory!"
99
continue
10-
data = open(file, "rb").read()
10+
data = open(filename, "rb").read()
1111
if '\0' in data:
12-
print file, "Binary!"
12+
print filename, "Binary!"
1313
continue
1414
newdata = data.replace("\r\n", "\n")
1515
if newdata != data:
16-
print file
17-
f = open(file, "wb")
16+
print filename
17+
f = open(filename, "wb")
1818
f.write(newdata)
1919
f.close()

0 commit comments

Comments
 (0)