[yum-git] yum/yumRepo.py

Jeremy Katz katzj at linux.duke.edu
Thu Mar 13 15:28:29 UTC 2008


 yum/yumRepo.py |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit d7ed05b9d36916f8147d424f778895291e21baae
Author: Jeremy Katz <katzj at redhat.com>
Date:   Thu Mar 13 11:27:06 2008 -0400

    Don't traceback if we can't read the mirrorlist (#428249)

diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index 202eb48..b837328 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -1243,7 +1243,11 @@ class YumRepository(Repository, config.RepoConf):
                 fo = None
         
         if fo is not None:
-            content = fo.readlines()
+            try:
+                content = fo.readlines()
+            except Exception, e:
+                print "Could not read mirrorlist %s error was \n%s" %(url, e)
+                content = ""
             for line in content:
                 if re.match('^\s*\#.*', line) or re.match('^\s*$', line):
                     continue



More information about the Yum-cvs-commits mailing list