[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[master] yum: handle PackageSackErrors separately in AnacondaYum._run.



Otherwise we assume the exception has more fields than it really does.

Resolves: rhbz#717307
---
 pyanaconda/yuminstall.py |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/pyanaconda/yuminstall.py b/pyanaconda/yuminstall.py
index e3afdff..a1a44dc 100644
--- a/pyanaconda/yuminstall.py
+++ b/pyanaconda/yuminstall.py
@@ -1032,6 +1032,14 @@ class AnacondaYum(yum.YumBase):
 
         try:
             self.runTransaction(cb=cb)
+        except PackageSackError as e:
+            log.error("AnacondaYum._run: PackageSackError: %s" % e)
+            msg = _("There was an error running your transaction for "
+                    "the following reason: %s.\n") % str(e)
+            intf.messageWindow(_("Error Running Transaction"),
+                               msg, type="custom",
+                               custom_icon="error", custom_buttons=[_("_Exit installer")])
+            sys.exit(1)
         except YumBaseError as probs:
             # FIXME: we need to actually look at these problems...
             probTypes = { rpm.RPMPROB_NEW_FILE_CONFLICT : _('file conflicts'),
-- 
1.7.5.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]