diff options
author | GammaC0de <GammaC0de@users.noreply.github.com> | 2016-01-05 14:52:29 +0100 |
---|---|---|
committer | GammaC0de <GammaC0de@users.noreply.github.com> | 2016-01-05 14:52:29 +0100 |
commit | 5888dd692eb91c299101864c4963685a1bf089e8 (patch) | |
tree | c61aed60952d074f6b4699b5e886de30b2c20081 | |
parent | [Misc] Update (diff) | |
download | pyload-5888dd692eb91c299101864c4963685a1bf089e8.tar.xz |
[ExternalScripts] fix #2264
-rw-r--r-- | module/plugins/hooks/ExternalScripts.py | 8 |
1 files 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 |