Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c85bf58 commit 47172b4Copy full SHA for 47172b4
1 file changed
Tools/scripts/crlf.py
@@ -3,17 +3,17 @@
3
"Replace CRLF with LF in argument files. Print names of changed files."
4
5
import sys, os
6
-for file in sys.argv[1:]:
7
- if os.path.isdir(file):
8
- print file, "Directory!"
+for filename in sys.argv[1:]:
+ if os.path.isdir(filename):
+ print filename, "Directory!"
9
continue
10
- data = open(file, "rb").read()
+ data = open(filename, "rb").read()
11
if '\0' in data:
12
- print file, "Binary!"
+ print filename, "Binary!"
13
14
newdata = data.replace("\r\n", "\n")
15
if newdata != data:
16
- print file
17
- f = open(file, "wb")
+ print filename
+ f = open(filename, "wb")
18
f.write(newdata)
19
f.close()
0 commit comments