check-mirrors return-mirrorlist.py,1.13,1.14
Michael Patrick McGrath (mmcgrath)
fedora-extras-commits at redhat.com
Mon Aug 7 03:01:51 UTC 2006
Author: mmcgrath
Update of /cvs/fedora/check-mirrors
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv32605
Modified Files:
return-mirrorlist.py
Log Message:
Added additional statistical information.
Index: return-mirrorlist.py
===================================================================
RCS file: /cvs/fedora/check-mirrors/return-mirrorlist.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- return-mirrorlist.py 4 Aug 2006 20:03:49 -0000 1.13
+++ return-mirrorlist.py 7 Aug 2006 03:01:42 -0000 1.14
@@ -18,6 +18,8 @@
# TODO:
# - maybe a macro of certain country codes expand out to multiple countries
# note: - maintaining the abovelist will become a royal bitch.
+# - Note, this script does have some dependancies on the file list
+# This should be removed in later versions
debug = False
@@ -83,6 +85,7 @@
return dataList
def printMirrors(self, repo, arch, country):
+ """ Print mirrors """
rows = self.getMirrors(repo, arch, country)
results = 0
for row in rows:
@@ -97,6 +100,7 @@
return True
def printStats(self):
+ """ Print statistical information about the mirrors """
try:
self.dbcursor.execute('SELECT * FROM mirrors;')
except sqlite.Error, err:
@@ -109,7 +113,8 @@
print '# %s' % row[4]
print '# Country: %s' % row[3]
print '# Last Good: %s' % row[8]
- print '# uptime: %i%%' % good
+ print '# Uptime: %i%%' % good
+ print '# Valid: %i' % row[7]
print '# -----------------------------------'
return True
More information about the fedora-extras-commits
mailing list