From 39f42cfd75305e5e2a893e54c0a20781be6231ae Mon Sep 17 00:00:00 2001 From: Seth Vidal Date: Mon, 27 Feb 2012 17:53:02 -0500 Subject: [PATCH] when it is an IOError or an OSError - return a normal error message instead of a traceback barf --- library/command | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/library/command b/library/command index f94ee7f9e33..0f912e0b69e 100755 --- a/library/command +++ b/library/command @@ -17,6 +17,12 @@ try: cmd = subprocess.Popen(args, shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = cmd.communicate() +except (OSError, IOError), e: + print json.dumps({ + "failed": 1, + "error": str(e), + }) + sys.exit(1) except: print json.dumps({ "failed" : 1,