[PATCH 2/2] Fix listing threads that caused an error
Vratislav Podzimek
vpodzime at redhat.com
Mon Jan 27 13:36:06 UTC 2014
Only the threads that have some error listed should be reported. Empty dict
entries should be skipped.
Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
pyanaconda/threads.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/threads.py b/pyanaconda/threads.py
index 74acef6..5b7a80b 100644
--- a/pyanaconda/threads.py
+++ b/pyanaconda/threads.py
@@ -121,8 +121,9 @@ class ThreadManager(object):
self.wait(name)
if self.any_errors:
- msg = "Unhandled errors from the following threads detected: %s" %\
- ", ".join(self._errors.iterkeys())
+ thread_names = ", ".join(thread_name for thread_name in self._errors.iterkeys()
+ if self._errors[thread_name])
+ msg = "Unhandled errors from the following threads detected: %s" % thread_names
raise RuntimeError(msg)
def set_error(self, name, *exc_info):
--
1.8.5.3
More information about the anaconda-patches
mailing list