[Python-checkins] python/dist/src/Tools/scripts crlf.py,1.3,1.4
akuchling@users.sourceforge.net
akuchling@users.sourceforge.net
Tue, 13 May 2003 07:51:41 -0700
Update of /cvsroot/python/python/dist/src/Tools/scripts
In directory sc8-pr-cvs1:/tmp/cvs-serv31840a
Modified Files:
crlf.py
Log Message:
[Bug #724767] crlf.py uses the variable name file, which it shouldn't anymore.
Index: crlf.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/scripts/crlf.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** crlf.py 13 Nov 2002 21:04:31 -0000 1.3
--- crlf.py 13 May 2003 14:51:39 -0000 1.4
***************
*** 4,19 ****
import sys, os
! for file in sys.argv[1:]:
! if os.path.isdir(file):
! print file, "Directory!"
continue
! data = open(file, "rb").read()
if '\0' in data:
! print file, "Binary!"
continue
newdata = data.replace("\r\n", "\n")
if newdata != data:
! print file
! f = open(file, "wb")
f.write(newdata)
f.close()
--- 4,19 ----
import sys, os
! for filename in sys.argv[1:]:
! if os.path.isdir(filename):
! print filename, "Directory!"
continue
! data = open(filename, "rb").read()
if '\0' in data:
! print filename, "Binary!"
continue
newdata = data.replace("\r\n", "\n")
if newdata != data:
! print filename
! f = open(filename, "wb")
f.write(newdata)
f.close()