From e7b409c8b70cc9135c3df2fac2cc5491ba1fbca1 Mon Sep 17 00:00:00 2001 From: Phyks Date: Tue, 7 Oct 2014 11:30:44 +0200 Subject: [PATCH] Horrible file writing --- bmc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bmc.py b/bmc.py index 970f063..1ee3ce8 100755 --- a/bmc.py +++ b/bmc.py @@ -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: