check-mirrors check-mirrors.py,1.27,1.28

Michael Patrick McGrath (mmcgrath) fedora-extras-commits at redhat.com
Mon Aug 7 04:22:51 UTC 2006


Author: mmcgrath

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

Modified Files:
	check-mirrors.py 
Log Message:
Fixed bug where db connection would get created after some repos had already
been scanned.



Index: check-mirrors.py
===================================================================
RCS file: /cvs/fedora/check-mirrors/check-mirrors.py,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- check-mirrors.py	4 Aug 2006 20:03:49 -0000	1.27
+++ check-mirrors.py	7 Aug 2006 04:22:48 -0000	1.28
@@ -201,8 +201,7 @@
 
             elif child_name == 'timestamp':
                 self.timestamp = child.text
-    
-        
+
 class RepoMD:
     """represents the repomd xml file"""
     
@@ -341,7 +340,6 @@
         item = MirrorListInfo()
         broken = False
 
-
         if section.lower() == 'global':
             item.mirrorid = '%s' % section
             if conf.has_option(section, 'db'):
@@ -406,14 +404,14 @@
 
     sections = config(cfg_file)
     gi = GeoIP.new(GeoIP.GEOIP_STANDARD)
-
-    # grab the canonical mirrors info
+    # setup our database
     for s in sections:
-        mirrors = []
-
         if s.mirrorid == 'global':
             DB = RepoDB(s.db)
-            continue
+    
+    # grab the canonical mirrors info
+    for s in sections:
+        mirrors = []
 
         ug = URLGrabber(timeout=s.timeout)
         s.populate_mirrorlist(ug)




More information about the fedora-extras-commits mailing list