check-mirrors return-mirrorlist.py,1.20,1.21
Michael Patrick McGrath (mmcgrath)
fedora-extras-commits at redhat.com
Mon Jan 22 15:33:16 UTC 2007
Author: mmcgrath
Update of /cvs/fedora/check-mirrors
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24817
Modified Files:
return-mirrorlist.py
Log Message:
Added a 'minimum mirrors' type value. If it is not met the script will return all valid mirrors
Index: return-mirrorlist.py
===================================================================
RCS file: /cvs/fedora/check-mirrors/return-mirrorlist.py,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- return-mirrorlist.py 16 Nov 2006 17:33:36 -0000 1.20
+++ return-mirrorlist.py 22 Jan 2007 15:33:13 -0000 1.21
@@ -21,7 +21,7 @@
# - Note, this script does have some dependancies on the file list
# This should be removed in later versions
# - Top has SQL Injection issues. needs an isint()
-debug = True
+debug = False
import os
import sys
@@ -88,7 +88,7 @@
print "%s" % re.sub('\$ARCH', self.arch, field)
results = results + 1
- if results == 0:
+ if results <= 5:
if self.country != 'global' and recursive == 0:
print '# No results found for country: %s\n# Defaulting to global' % self.country
#self.country='global'
@@ -96,7 +96,7 @@
self.printMirrors(recursive = 1)
#self.printMirrors(self.repo, self.arch, 'global')
else:
- print '# no mirrors found, using default'
+ print '# not enough mirrors found, using global'
return False
else:
return True
More information about the scm-commits
mailing list