From b86aa97c3ec1432fc21002e263eb7dd63dec2233 Mon Sep 17 00:00:00 2001 From: Alessandro Pilotti Date: Sat, 1 Dec 2012 22:22:36 +0200 Subject: 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 --- update.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update.py b/update.py index d7b0c18..6ad205f 100644 --- a/update.py +++ b/update.py @@ -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() -- cgit