diff options
author | Damien Churchill <damoc@gmail.com> | 2009-12-10 17:35:35 +0000 |
---|---|---|
committer | Damien Churchill <damoc@gmail.com> | 2009-12-10 17:35:35 +0000 |
commit | 9e9fbd62428cac2acb3b2b94eaf971f553a72bd4 (patch) | |
tree | 6b51646548819013aab4c222fa1d5bbf0eb46e29 | |
parent | 2840d43ccbcea980688db7eded27801ba5d9cd53 (diff) | |
download | deluge-9e9fbd62428cac2acb3b2b94eaf971f553a72bd4.tar.gz deluge-9e9fbd62428cac2acb3b2b94eaf971f553a72bd4.tar.bz2 deluge-9e9fbd62428cac2acb3b2b94eaf971f553a72bd4.zip |
fix uploading plugins when the daemon is not localhost
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | deluge/ui/gtkui/preferences.py | 6 |
2 files changed, 4 insertions, 3 deletions
@@ -17,6 +17,7 @@ torrent creation * Fix crash in Windows when creating a torrent * Add button to Other preferences to associate magnet links with Deluge + * Fix uploading plugins when the daemon is not localhost ==== Console ==== * Fix using the console in Windows, but only in command-line mode diff --git a/deluge/ui/gtkui/preferences.py b/deluge/ui/gtkui/preferences.py index 02b593e6a..74a9b2e3c 100644 --- a/deluge/ui/gtkui/preferences.py +++ b/deluge/ui/gtkui/preferences.py @@ -932,6 +932,7 @@ class Preferences(component.Component): chooser.destroy() return + import base64 import shutil import os.path filename = os.path.split(filepath)[1] @@ -943,9 +944,8 @@ class Preferences(component.Component): if not client.is_localhost(): # We need to send this plugin to the daemon - client.core.upload_plugin( - filename, - xmlrpclib.Binary(open(filepath, "rb").read())) + filedump = base64.encodestring(open(filepath, "rb").read()) + client.core.upload_plugin(filename, filedump) client.core.rescan_plugins() chooser.destroy() |