Catch OSError if script isn't in $PATH

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
This commit is contained in:
Zack Cerza 2013-12-16 13:34:37 -06:00
parent 420fff6207
commit c22ee528b7

View File

@ -225,7 +225,11 @@ def run_with_watchdog(process, job_config):
'-j',
job_info['job_id'],
]
subprocess.Popen(args).wait()
try:
subprocess.Popen(args).wait()
log.warn("Reported results via the teuthology-report command")
except OSError:
log.warn("Tried to run teuthology-report but it wasn't in $PATH")
else:
# Let's make sure that paddles knows the job is finished. We don't know
# the status, but if it was a pass or fail it will have already been