Improve error messages
authorPeter Amstutz <peter.amstutz@curoverse.com>
Tue, 1 Jul 2014 17:50:31 +0000 (13:50 -0400)
committerPeter Amstutz <peter.amstutz@curoverse.com>
Tue, 1 Jul 2014 17:50:31 +0000 (13:50 -0400)
crunch_scripts/run-command

index aa50cde4d7d6d6ab3931101992e55a67ba6f9f74..39357d4d9e54b516c8a916126e15f02ccd530e65 100755 (executable)
@@ -50,12 +50,14 @@ try:
         stdoutname = subst.do_substitution(p, p["stdout"])
         stdoutfile = open(stdoutname, "wb")
 
-    print("Running command: {}{}".format(' '.join(cmd), (" > " + stdoutname) if stdoutname != None else ""))
+    print("run-command running: {}{}".format(' '.join(cmd), (" > " + stdoutname) if stdoutname != None else ""))
 
     rcode = subprocess.call(cmd, stdout=stdoutfile)
 
+    print("run-command completed with exit code %i" % rcode)
+
 except Exception as e:
-    print("Caught exception {}".format(e))
+    print("run-command exception: {}".format(e))
 
 finally:
     for l in links: