[yum-git] plugins/fastestmirror
James Antill
james at linux.duke.edu
Sat Jun 28 01:39:47 UTC 2008
plugins/fastestmirror/fastestmirror.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 940096060d75d93dda18dd952b5ffc8938f52f3b
Author: James Antill <james at and.org>
Date: Fri Jun 27 21:15:27 2008 -0400
Work in cacheonly mode if we can't write to the datafile
diff --git a/plugins/fastestmirror/fastestmirror.py b/plugins/fastestmirror/fastestmirror.py
index a2cb74e..9e4786c 100644
--- a/plugins/fastestmirror/fastestmirror.py
+++ b/plugins/fastestmirror/fastestmirror.py
@@ -130,9 +130,12 @@ def postreposetup_hook(conduit):
@type loadcache : Boolean
"""
global loadcache, exclude
+
opts, commands = conduit.getCmdLine()
- if hasattr(opts, 'cacheonly') and opts.cacheonly:
+ if ((hasattr(opts, 'cacheonly') and opts.cacheonly) or
+ not os.access(hostfilepath, os.W_OK)):
return
+
if loadcache:
conduit.info(2, "Loading mirror speeds from cached hostfile")
read_timedhosts()
More information about the Yum-cvs-commits
mailing list