update.py saves files with CRLF EOL style on Windows
Bug #1075230 reported by
Alessandro Pilotti
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oslo-incubator |
Fix Released
|
Low
|
Alessandro Pilotti | ||
Grizzly |
Fix Released
|
Low
|
Alessandro Pilotti |
Bug Description
By executing on Windows:
python update.py ..\python-
As detailed in:
http://
File are saved with CRLF EOL convention and need no be converted to UNIX EOL before commit.
affects: | openstack-common → oslo |
Changed in oslo: | |
status: | In Progress → Fix Committed |
Changed in oslo: | |
milestone: | none → grizzly-2 |
status: | Fix Committed → Fix Released |
Changed in oslo: | |
assignee: | nobody → Alessandro Pilotti (alexpilotti) |
To post a comment you must log in.
Here's the code responsible
def _replace(path, pattern, replacement):
f.truncate( )
f.write( re.sub( pattern, replacement, line))
with open(path, "r+") as f:
lines = f.readlines()
f.seek(0)
for line in lines: