There are many code paths depending on the state in which an exception
appears. Some logging could be useful when searching for bugs.
---
pyanaconda/exception.py | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/exception.py b/pyanaconda/exception.py
index 81f2a87..a24e809 100644
--- a/pyanaconda/exception.py
+++ b/pyanaconda/exception.py
@@ -80,6 +80,8 @@ class AnacondaExceptionHandler(ExceptionHandler):
"""
+ log.debug("running handleException")
+
ty = dump_info.exc_info.type
if issubclass(ty, blivet.errors.StorageError) and value.hardware_fault:
@@ -105,21 +107,28 @@ class AnacondaExceptionHandler(ExceptionHandler):
if Gtk.main_level() > 0:
# main loop is running, don't crash it by running another one
# potentially from a different thread
+ log.debug("Gtk running, queuing exception handler to the "
+ "main loop")
GLib.idle_add(self.run_handleException, dump_info)
else:
- log.info("running handler")
+ log.debug("Gtk not running, starting Gtk and running "
+ "exception handler in it")
super(AnacondaExceptionHandler, self).handleException(
dump_info)
except RuntimeError:
+ log.debug("Gtk cannot be initialized")
# X not running (Gtk cannot be initialized)
if threadMgr.in_main_thread():
+ log.debug("In the main thread, running exception handler")
print "An unknown error has occured, look at the "\
"/tmp/anaconda-tb* file(s) for more details"
# in the main thread, run exception handler
super(AnacondaExceptionHandler, self).handleException(
dump_info)
else:
+ log.debug("In a non-main thread, sending a message with "
+ "exception data")
# not in the main thread, just send message with exception
# data and let message handler run the exception handler in
# the main thread
--
1.7.11.7