summaryrefslogtreecommitdiff
path: root/utils/common/gitscraper.py
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2012-02-06 00:14:25 +0100
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2012-02-06 00:14:25 +0100
commit64f71e66b2ed6e7ac39cb505b8c1a753006809df (patch)
tree91adbf6cc50f84b8f53138c1903907465fc28c9b /utils/common/gitscraper.py
parent13e640c2d6502dd17cc451ee990748df2f5cd1d0 (diff)
downloadrockbox-64f71e66b2ed6e7ac39cb505b8c1a753006809df.zip
rockbox-64f71e66b2ed6e7ac39cb505b8c1a753006809df.tar.gz
rockbox-64f71e66b2ed6e7ac39cb505b8c1a753006809df.tar.bz2
rockbox-64f71e66b2ed6e7ac39cb505b8c1a753006809df.tar.xz
When writing data from repository open file as binary.
Windows requires files to be explicitly opened as binaries, otherwise it will perform line ending translations. We really don't want the OS to mess with that. Change-Id: Id56de354b7ad0e5b056540755f7108456f3263ed
Diffstat (limited to 'utils/common/gitscraper.py')
-rwxr-xr-xutils/common/gitscraper.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/common/gitscraper.py b/utils/common/gitscraper.py
index 49ef42d..cfa017a 100755
--- a/utils/common/gitscraper.py
+++ b/utils/common/gitscraper.py
@@ -115,7 +115,7 @@ def get_object(repo, blob, destfile):
return False
if not os.path.exists(os.path.dirname(destfile)):
os.makedirs(os.path.dirname(destfile))
- f = open(destfile, 'w')
+ f = open(destfile, 'wb')
for line in cmdout[0]:
f.write(line)
f.close()