check-mirrors check-mirrors.py,1.11,1.12

Seth Vidal (skvidal) fedora-extras-commits at redhat.com
Fri Jul 14 18:14:53 UTC 2006


Author: skvidal

Update of /cvs/fedora/check-mirrors
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3565

Modified Files:
	check-mirrors.py 
Log Message:

fix for mirror in list with unresolveable address



Index: check-mirrors.py
===================================================================
RCS file: /cvs/fedora/check-mirrors/check-mirrors.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- check-mirrors.py	13 Jul 2006 15:06:34 -0000	1.11
+++ check-mirrors.py	14 Jul 2006 18:14:50 -0000	1.12
@@ -351,9 +351,14 @@
         # get the info for all the mirrors
             
         for url in s.mirrorlist:
-            m = MirrorContainer(url, ug, s.archlist, gi)
-            if m:
-                mirrors.append(m)
+            try:
+                m = MirrorContainer(url, ug, s.archlist, gi)
+            except socket.gaierror, e:
+                errorprint("Cannot get address for mirror %s" % url)
+                continue
+            else:
+                if m:
+                    mirrors.append(m)
         
         # print them out per-arch and per-country
         for arch in s.archlist:




More information about the fedora-extras-commits mailing list