From 20f0a8ec4f2ae9d2235b1976d21006a270ccb0d9 Mon Sep 17 00:00:00 2001 From: Raphaël Beamonte Date: Sun, 23 Dec 2012 21:36:35 -0500 Subject: Adds is_alive() before join() to remove a RuntimeError raise when Ctrl-C on module error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Raphaël Beamonte Signed-off-by: David Sommerseth --- rteval/modules/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rteval/modules/__init__.py b/rteval/modules/__init__.py index c4e83cc..bbd2b6c 100644 --- a/rteval/modules/__init__.py +++ b/rteval/modules/__init__.py @@ -438,7 +438,8 @@ start their workloads yet""" mod.setStop() try: self._logger.log(Log.DEBUG, "\t - Stopping %s" % modname) - mod.join(2.0) + if mod.is_alive(): + mod.join(2.0) except RuntimeError, e: self._logger.log(Log.ERR, "\t\tFailed stopping %s: %s" % (modname, str(e))) -- cgit