[master][PATCH] Log exceptions before running exception handling

Vratislav Podzimek vpodzime at redhat.com
Mon Jan 27 13:45:53 UTC 2014


Our exception handling code is quite complicated (especiall in text mode) and
it may happen the exception is never processed. Log the exception ASAP so that
we have the most important information somewhere in any case.

Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
 pyanaconda/exception.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/pyanaconda/exception.py b/pyanaconda/exception.py
index b6bde73..48046c6 100644
--- a/pyanaconda/exception.py
+++ b/pyanaconda/exception.py
@@ -33,6 +33,7 @@ import time
 import re
 import errno
 import glob
+import traceback
 import blivet.errors
 from pyanaconda.errors import CmdlineError
 from pyanaconda.ui.communication import hubQ
@@ -81,6 +82,8 @@ class AnacondaExceptionHandler(ExceptionHandler):
         """
 
         log.debug("running handleException")
+        exception_lines = traceback.format_exception(*dump_info.exc_info)
+        log.debug("\n".join(exception_lines))
 
         ty = dump_info.exc_info.type
         value = dump_info.exc_info.value
-- 
1.8.5.3



More information about the anaconda-patches mailing list