From 68990b4a3f4d033b622fd4e27942f829bfcd03b1 Mon Sep 17 00:00:00 2001 From: John Garland Date: Sun, 16 Sep 2012 18:40:53 +1000 Subject: [PATCH] Fix execute plugin not working with unicode torrent names --- deluge/plugins/execute/execute/core.py | 8 ++++++++ 1 file changed, 8 insertions(+) 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):