diff tools/effectiveT3/effectiveT3.py @ 18:999776f0aee4 draft

v0.0.16, adding new model TTSS-STD-2.0.2.jar
author peterjc
date Mon, 21 Sep 2015 05:45:51 -0400
parents bc93121586ba
children d24181fd3a40
line wrap: on
line diff
--- a/tools/effectiveT3/effectiveT3.py	Thu May 21 10:48:40 2015 -0400
+++ b/tools/effectiveT3/effectiveT3.py	Mon Sep 21 05:45:51 2015 -0400
@@ -21,7 +21,7 @@
 
 if "-v" in sys.argv or "--version" in sys.argv:
     # TODO - Get version of the JAR file dynamically?
-    print("Wrapper v0.0.14, TTSS_GUI-1.0.1.jar")
+    print("Wrapper v0.0.15, TTSS_GUI-1.0.1.jar")
     sys.exit(0)
 
 def sys_exit(msg, error_level=1):
@@ -83,13 +83,14 @@
     # Use .communicate as can get deadlocks with .wait(),
     stdout, stderr = child.communicate()
     return_code = child.returncode
-    if return_code:
+    if return_code or stderr.startswith("Exception in thread"):
         cmd_str= " ".join(cmd)  # doesn't quote spaces etc
         if stderr and stdout:
             sys_exit("Return code %i from command:\n%s\n\n%s\n\n%s" % (return_code, cmd_str, stdout, stderr))
         else:
             sys_exit("Return code %i from command:\n%s\n%s" % (return_code, cmd_str, stderr))
 
+
 if not os.path.isdir(effectiveT3_dir):
     sys_exit("Effective T3 folder not found: %r" % effectiveT3_dir)