Horrible file writing
This commit is contained in:
parent
d506124f9d
commit
e7b409c8b7
2
bmc.py
2
bmc.py
@ -288,7 +288,7 @@ def downloadFile(url, filetype, manual, autoconfirm, tag):
|
|||||||
print('Download finished')
|
print('Download finished')
|
||||||
tmp = tempfile.NamedTemporaryFile(suffix='.'+contenttype)
|
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)
|
fh.write(dl)
|
||||||
new_name = addFile(tmp.name, filetype, manual, autoconfirm, tag)
|
new_name = addFile(tmp.name, filetype, manual, autoconfirm, tag)
|
||||||
if new_name is False:
|
if new_name is False:
|
||||||
|
Loading…
Reference in New Issue
Block a user