From c22ee528b7624f3f499c7a0da0c9f2cfa967a70c Mon Sep 17 00:00:00 2001
From: Zack Cerza <zack@cerza.org>
Date: Mon, 16 Dec 2013 13:34:37 -0600
Subject: [PATCH] Catch OSError if script isn't in $PATH

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
---
 teuthology/queue.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/teuthology/queue.py b/teuthology/queue.py
index d95ea15242f..d4da2ea60dc 100644
--- a/teuthology/queue.py
+++ b/teuthology/queue.py
@@ -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