Skip to content

Commit 0ca5c6b

Browse files
authored
Merge pull request #4 from MrTchuss/feat_download-binary-files
Download binary files
2 parents 35091ef + 260426e commit 0ca5c6b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ def putDataToFile(data, filename):
148148
Put data to the local file filename
149149
'''
150150
logging.info ("Writing data to the file {0}".format(filename))
151-
f = open(filename,'w')
152-
f.write(data)
151+
f = open(filename,'wb')
152+
f.write(data.encode("utf-8"))
153153
logging.debug("Data has been written in {0}".format(filename))
154154
f.close()
155155
return True

0 commit comments

Comments
 (0)