summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Garland <johnnybg+deluge@gmail.com>2012-09-16 18:40:53 +1000
committerJohn Garland <johnnybg+deluge@gmail.com>2012-09-16 18:40:53 +1000
commit68990b4a3f4d033b622fd4e27942f829bfcd03b1 (patch)
tree3d26ee5e9a5c4893b1e87be27e2d009f2f9deea7
parent17cac01673d479ecb4f4dbbc16a5c82bc19907e9 (diff)
downloaddeluge-68990b4a3f4d033b622fd4e27942f829bfcd03b1.tar.gz
deluge-68990b4a3f4d033b622fd4e27942f829bfcd03b1.tar.bz2
deluge-68990b4a3f4d033b622fd4e27942f829bfcd03b1.zip
Fix execute plugin not working with unicode torrent names
-rw-r--r--deluge/plugins/execute/execute/core.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/deluge/plugins/execute/execute/core.py b/deluge/plugins/execute/execute/core.py
index a1df19ea5..9d95f74f9 100644
--- a/deluge/plugins/execute/execute/core.py
+++ b/deluge/plugins/execute/execute/core.py
@@ -108,6 +108,14 @@ class Core(CorePluginBase):
else:
save_path = info["save_path"]
+ # getProcessOutputAndValue requires args to be str
+ if isinstance(torrent_name, unicode):
+ torrent_id = torrent_id.encode("utf-8", "ignore")
+ if isinstance(torrent_name, unicode):
+ torrent_name = torrent_name.encode("utf-8", "ignore")
+ if isinstance(save_path, unicode):
+ save_path = save_path.encode("utf-8", "ignore")
+
log.debug("[execute] Running commands for %s", event)
def log_error(result, command):