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

[PATCH 2/2] If there are any troubles reading the treeinfo file, return no addons.



It beats a traceback any day.
---
 pyanaconda/yuminstall.py |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/yuminstall.py b/pyanaconda/yuminstall.py
index e00ea8f..6fb28f5 100644
--- a/pyanaconda/yuminstall.py
+++ b/pyanaconda/yuminstall.py
@@ -667,8 +667,11 @@ class AnacondaYum(yum.YumBase):
 
         # We need to know which variant is being installed so we know what addons
         # are valid options.
-        ConfigParser.read(c, treeinfo)
-        variant = c.get("general", "variant")
+        try:
+            ConfigParser.read(c, treeinfo)
+            variant = c.get("general", "variant")
+        except:
+            return retval
 
         section = "variant-%s" % variant
         if c.has_section(section) and c.has_option(section, "addons"):
-- 
1.7.1.1


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