[PATCH 2/3] DNFPayload: log import crashes.

Ales Kozumplik akozumpl at redhat.com
Wed Feb 12 12:28:44 UTC 2014


From: Ales Kozumplik <ales at redhat.com>

Anyway, Anaconda should handle these more gracefully then with the "SIGCHLD
caught when trying to start the X server.".
---
 pyanaconda/anaconda.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/pyanaconda/anaconda.py b/pyanaconda/anaconda.py
index 88a9a4d..c23630c 100644
--- a/pyanaconda/anaconda.py
+++ b/pyanaconda/anaconda.py
@@ -120,7 +120,11 @@ class Anaconda(object):
                     from pyanaconda.packaging.livepayload import LiveImageKSPayload
                     klass = LiveImageKSPayload
                 elif flags.dnf:
-                    from pyanaconda.packaging.dnfpayload import DNFPayload as klass
+                    try:
+                        from pyanaconda.packaging.dnfpayload import DNFPayload
+                        klass = DNFPayload
+                    except Exception:
+                        log.critical('Importing DNF  failed.', exc_info=True)
                 else:
                     from pyanaconda.packaging.yumpayload import YumPayload
                     klass = YumPayload
-- 
1.8.5.3



More information about the anaconda-patches mailing list