when it is an IOError or an OSError - return a normal error message instead of a traceback barf

reviewable/pr18780/r1
Seth Vidal 13 years ago
parent 07d17e4cb4
commit a26f236e9b

@ -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,

Loading…
Cancel
Save