diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2012-10-13 12:37:03 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2012-10-13 12:37:03 +0200 |
commit | 10879744d04ef81939e474714dac7c836f30005c (patch) | |
tree | 6b451d520faf38888d0174adc9b45a7fb8e4843e /module/common | |
parent | create more compact type info for testing (diff) | |
download | pyload-10879744d04ef81939e474714dac7c836f30005c.tar.xz |
fixed JsEngine init
Diffstat (limited to 'module/common')
-rw-r--r-- | module/common/JsEngine.py | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/module/common/JsEngine.py b/module/common/JsEngine.py index 38c2b291d..ef7494d16 100644 --- a/module/common/JsEngine.py +++ b/module/common/JsEngine.py @@ -55,14 +55,17 @@ if not ENGINE or DEBUG: pass if not ENGINE or DEBUG: - import subprocess - subprocess.Popen(["node", "-v"], bufsize=-1, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() - p = subprocess.Popen(["node", "-e", "console.log(23+19)"], stdout=subprocess.PIPE, stderr=subprocess.PIPE) - out, err = p.communicate() - #integrity check - if out.strip() == "42": - ENGINE = "node" - NODE = True + try: + import subprocess + subprocess.Popen(["node", "-v"], bufsize=-1, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() + p = subprocess.Popen(["node", "-e", "console.log(23+19)"], stdout=subprocess.PIPE, stderr=subprocess.PIPE) + out, err = p.communicate() + #integrity check + if out.strip() == "42": + ENGINE = "node" + NODE = True + except: + pass if not ENGINE or DEBUG: try: |