Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Write download as binary for Windoze
Browse files Browse the repository at this point in the history
  • Loading branch information
twpayne committed Jan 7, 2013
1 parent 629cb59 commit df922ea
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pake.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,7 @@ def download(self, url, md5=None):
content = urllib2.urlopen(url).read()
if md5 and hashlib.md5(content).hexdigest() != md5:
raise BuildError(self, 'corrupt download')
# FIXME Python on Windoze corrupts the content when writing it
# FIXME probably something to do with encodings
with open(self.name, 'w') as f:
with open(self.name, 'wb') as f:
f.write(content)

def error(self, message):
Expand Down

0 comments on commit df922ea

Please sign in to comment.