[Console] Ensure opening torrent files in binary mode
This commit is contained in:
parent
e3b8aaf276
commit
4619b31aa3
|
@ -77,7 +77,7 @@ def add_torrent(t_file, options, success_cb, fail_cb, ress):
|
|||
continue
|
||||
|
||||
filename = os.path.split(f)[-1]
|
||||
with open(f) as _file:
|
||||
with open(f, 'rb') as _file:
|
||||
filedump = base64.encodestring(_file.read())
|
||||
|
||||
client.core.add_torrent_file(
|
||||
|
|
|
@ -386,7 +386,7 @@ class AddTorrents(BaseMode):
|
|||
filename = m
|
||||
directory = os.path.join(*self.path_stack[:self.path_stack_pos])
|
||||
path = os.path.join(directory, filename)
|
||||
with open(path) as _file:
|
||||
with open(path, 'rb') as _file:
|
||||
filedump = base64.encodestring(_file.read())
|
||||
t_options = {}
|
||||
if result['location']['value']:
|
||||
|
|
Loading…
Reference in New Issue