Horrible file writing

This commit is contained in:
Phyks 2014-10-07 11:30:44 +02:00
parent d506124f9d
commit e7b409c8b7

2
bmc.py
View File

@ -288,7 +288,7 @@ def downloadFile(url, filetype, manual, autoconfirm, tag):
print('Download finished')
tmp = tempfile.NamedTemporaryFile(suffix='.'+contenttype)
with open(tmp.name, 'w+', encoding='utf-8') as fh:
with open(tmp.name, 'wb+') as fh:
fh.write(dl)
new_name = addFile(tmp.name, filetype, manual, autoconfirm, tag)
if new_name is False: