diff --git a/deluge/core/core.py b/deluge/core/core.py index 6c2340145..afd938b2a 100644 --- a/deluge/core/core.py +++ b/deluge/core/core.py @@ -215,8 +215,12 @@ class Core( """ if save_path == "": save_path = None - - torrent_id = self.torrents.add(filename, filedump=filedump.data, + + # Make sure we are sending a string to add() + if not isinstance(filedump, str): + filedump = filedump.data + + torrent_id = self.torrents.add(filename, filedump=filedump, save_path=save_path) # Run the plugin hooks for 'post_torrent_add' diff --git a/deluge/ui/signalreceiver.py b/deluge/ui/signalreceiver.py index 7816a8d5a..2df0435e2 100644 --- a/deluge/ui/signalreceiver.py +++ b/deluge/ui/signalreceiver.py @@ -34,7 +34,7 @@ import sys import deluge.SimpleXMLRPCServer as SimpleXMLRPCServer from SocketServer import ThreadingMixIn -import xmlrpclib as xmlrpclib +import deluge.xmlrpclib as xmlrpclib import threading from deluge.log import LOG as log