Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
47172b4f
Commit
47172b4f
authored
May 13, 2003
by
Andrew M. Kuchling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bug #724767] crlf.py uses the variable name file, which it shouldn't anymore.
parent
c85bf582
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
Tools/scripts/crlf.py
Tools/scripts/crlf.py
+7
-7
No files found.
Tools/scripts/crlf.py
View file @
47172b4f
...
...
@@ -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
file
name
in
sys
.
argv
[
1
:]:
if
os
.
path
.
isdir
(
file
name
):
print
file
name
,
"Directory!"
continue
data
=
open
(
file
,
"rb"
).
read
()
data
=
open
(
file
name
,
"rb"
).
read
()
if
'
\
0
'
in
data
:
print
file
,
"Binary!"
print
file
name
,
"Binary!"
continue
newdata
=
data
.
replace
(
"
\
r
\
n
"
,
"
\
n
"
)
if
newdata
!=
data
:
print
file
f
=
open
(
file
,
"wb"
)
print
file
name
f
=
open
(
file
name
,
"wb"
)
f
.
write
(
newdata
)
f
.
close
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment