summaryrefslogtreecommitdiffstats
path: root/module/common
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-10-13 12:37:03 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-10-13 12:37:03 +0200
commit10879744d04ef81939e474714dac7c836f30005c (patch)
tree6b451d520faf38888d0174adc9b45a7fb8e4843e /module/common
parentcreate more compact type info for testing (diff)
downloadpyload-10879744d04ef81939e474714dac7c836f30005c.tar.xz
fixed JsEngine init
Diffstat (limited to 'module/common')
-rw-r--r--module/common/JsEngine.py19
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: