Skip to content

Commit 64f71e6

Browse files
committed
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
1 parent 13e640c commit 64f71e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utils/common/gitscraper.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def get_object(repo, blob, destfile):
115115
return False
116116
if not os.path.exists(os.path.dirname(destfile)):
117117
os.makedirs(os.path.dirname(destfile))
118-
f = open(destfile, 'w')
118+
f = open(destfile, 'wb')
119119
for line in cmdout[0]:
120120
f.write(line)
121121
f.close()

0 commit comments

Comments
 (0)