diff options
author | Raphaël Beamonte <raphael.beamonte@gmail.com> | 2012-12-23 21:36:35 -0500 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2013-01-04 14:16:25 +0100 |
commit | 20f0a8ec4f2ae9d2235b1976d21006a270ccb0d9 (patch) | |
tree | 82ae4569baea32b80b3b679ea2a84f3de48c275b | |
parent | 4ec58d1edaa094a3f768a23a35afb447361f8f72 (diff) | |
download | rteval-20f0a8ec4f2ae9d2235b1976d21006a270ccb0d9.tar.gz rteval-20f0a8ec4f2ae9d2235b1976d21006a270ccb0d9.tar.xz rteval-20f0a8ec4f2ae9d2235b1976d21006a270ccb0d9.zip |
Adds is_alive() before join() to remove a RuntimeError raise when Ctrl-C on module error
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
-rw-r--r-- | rteval/modules/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
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))) |