summaryrefslogtreecommitdiffstats
path: root/module/common/JsEngine.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/common/JsEngine.py')
-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: