From 5888dd692eb91c299101864c4963685a1bf089e8 Mon Sep 17 00:00:00 2001 From: GammaC0de Date: Tue, 5 Jan 2016 15:52:29 +0200 Subject: [ExternalScripts] fix #2264 --- module/plugins/hooks/ExternalScripts.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/module/plugins/hooks/ExternalScripts.py b/module/plugins/hooks/ExternalScripts.py index 9c7dbdba8..c78bce5a2 100644 --- a/module/plugins/hooks/ExternalScripts.py +++ b/module/plugins/hooks/ExternalScripts.py @@ -10,7 +10,7 @@ from module.plugins.internal.misc import encode class ExternalScripts(Addon): __name__ = "ExternalScripts" __type__ = "hook" - __version__ = "0.66" + __version__ = "0.67" __status__ = "testing" __config__ = [("activated", "bool", "Activated" , True ), @@ -109,11 +109,9 @@ class ExternalScripts(Addon): self.scripts[folder] = scripts def call_cmd(self, command, *args, **kwargs): - _args = ['"' + _arg + '"' if ' ' in encode(_arg) else _arg for _arg in args] + call = map(encode, [command] + list(args)) - call = map(encode, [command] + _args) - - self.log_debug("EXECUTE " + " ".join(call)) + self.log_debug("EXECUTE " + " ".join(['"' + _arg + '"' if ' ' in _arg else _arg for _arg in call])) p = subprocess.Popen(call, bufsize=-1) #@NOTE: output goes to pyload -- cgit v1.2.3