fix python3 install

This commit is contained in:
j 2014-10-31 18:11:03 +01:00
parent c6c8e0dc8a
commit ee12580bcb

View file

@ -89,7 +89,7 @@ class Install(Thread):
if dirname and not os.path.exists(dirname): if dirname and not os.path.exists(dirname):
os.makedirs(dirname) os.makedirs(dirname)
print(filename) print(filename)
with open(filename, 'w') as f: with open(filename, 'wb') as f:
with closing(urlopen(url)) as u: with closing(urlopen(url)) as u:
size = int(u.headers.get('content-length', 0)) size = int(u.headers.get('content-length', 0))
self.status['size'] = size self.status['size'] = size