diff options
author | Alessandro Pilotti <ap@pilotti.it> | 2012-12-01 22:22:36 +0200 |
---|---|---|
committer | Alessandro Pilotti <ap@pilotti.it> | 2012-12-01 22:22:36 +0200 |
commit | b86aa97c3ec1432fc21002e263eb7dd63dec2233 (patch) | |
tree | bd87cc057c10d1ca8c83ca34ce2268c9807f18d1 /update.py | |
parent | 1fd7694e96da4c7e461d3c966fab1e81ee57c315 (diff) | |
download | oslo-b86aa97c3ec1432fc21002e263eb7dd63dec2233.tar.gz oslo-b86aa97c3ec1432fc21002e263eb7dd63dec2233.tar.xz oslo-b86aa97c3ec1432fc21002e263eb7dd63dec2233.zip |
Fixes update.py issue with EOL style on Windows
Fixes Bug #1075230
Files are saved with the OS EOL conversion unless "b" is specified
in open(...). In this case we want to preserve the original EOL
convention.
Change-Id: Id756174d03c3e95db055d512ec4aa5a0eeb768b8
Diffstat (limited to 'update.py')
-rw-r--r-- | update.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -115,7 +115,7 @@ def _dest_path(path, base, dest_dir): def _replace(path, pattern, replacement): - with open(path, "r+") as f: + with open(path, "rb+") as f: lines = f.readlines() f.seek(0) f.truncate() |