diff options
author | Calum Lind <calumlind+deluge@gmail.com> | 2017-02-20 19:06:24 +0000 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2017-02-21 10:13:30 +0000 |
commit | f6e2dab58a1ae1e335ce43d26806f426843145e1 (patch) | |
tree | 4d40e96cf7a60293bd67bfa6b0fb3062d0b7ba74 /deluge/core/core.py | |
parent | 4a62c5eac29c51836ba2fa29c6c47b6d87215e23 (diff) | |
download | deluge-f6e2dab58a1ae1e335ce43d26806f426843145e1.tar.gz deluge-f6e2dab58a1ae1e335ce43d26806f426843145e1.tar.bz2 deluge-f6e2dab58a1ae1e335ce43d26806f426843145e1.zip |
[#2826] Fix create_torrent filedump not encoded
Diffstat (limited to 'deluge/core/core.py')
-rw-r--r-- | deluge/core/core.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/deluge/core/core.py b/deluge/core/core.py index 16070cb1c..c1805411e 100644 --- a/deluge/core/core.py +++ b/deluge/core/core.py @@ -835,7 +835,8 @@ class Core(component.Component): options = {} options['download_location'] = os.path.split(path)[0] with open(target, 'rb') as _file: - self.add_torrent_file(os.path.split(target)[1], _file.read(), options) + filedump = base64.encodestring(_file.read()) + self.add_torrent_file(os.path.split(target)[1], filedump, options) @export def upload_plugin(self, filename, filedump): |