Mercurial > repos > peterjc > effectivet3
diff tools/effectiveT3/effectiveT3.py @ 7:5f85301d50bf draft
v0.0.16, adding new model TTSS-STD-2.0.2.jar
author | peterjc |
---|---|
date | Mon, 21 Sep 2015 05:52:29 -0400 |
parents | 0f6eb4a75000 |
children | 60a9b3f760cc |
line wrap: on
line diff
--- a/tools/effectiveT3/effectiveT3.py Wed Aug 05 11:04:42 2015 -0400 +++ b/tools/effectiveT3/effectiveT3.py Mon Sep 21 05:52:29 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.16, 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)