[yum-cvs] 3 commits - plugins/fastestmirror
Luke Macken
lmacken at linux.duke.edu
Mon Dec 17 21:16:29 UTC 2007
plugins/fastestmirror/ChangeLog | 4 ++++
plugins/fastestmirror/fastestmirror.py | 8 +++++---
2 files changed, 9 insertions(+), 3 deletions(-)
New commits:
commit 89d7ec05cadcdba572b0cf204d9480e0791cd1eb
Author: Luke Macken <lmacken at redhat.com>
Date: Mon Dec 17 16:15:18 2007 -0500
Update fastestmirrors ChangeLog, and do a rev bump
diff --git a/plugins/fastestmirror/ChangeLog b/plugins/fastestmirror/ChangeLog
index f6c73bf..6195794 100644
--- a/plugins/fastestmirror/ChangeLog
+++ b/plugins/fastestmirror/ChangeLog
@@ -1,3 +1,7 @@
+* Dec 17 2007 Luke Macken <lmacken at redhat.com> - 0.3.2
+- Only display our mirrors if we have any
+- Strip any username:passwords from our mirrors hostname before we display it
+
* Dec 3 2007 Luke Macken <lmacken at redhat.com> - 0.3.1
- Support multiple excludes
diff --git a/plugins/fastestmirror/fastestmirror.py b/plugins/fastestmirror/fastestmirror.py
index cc9914e..c53b7a0 100644
--- a/plugins/fastestmirror/fastestmirror.py
+++ b/plugins/fastestmirror/fastestmirror.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Version: 0.3.1
+# Version: 0.3.2
#
# A plugin for the Yellowdog Updater Modified which sorts each repo's
# mirrorlist by connection speed prior to download.
commit e8cf60d2fa1bb73ecd4feec477e237b927b5fedb
Author: Luke Macken <lmacken at redhat.com>
Date: Mon Dec 17 16:11:44 2007 -0500
Strip any username:passwords from our mirrors hostname before we display it
diff --git a/plugins/fastestmirror/fastestmirror.py b/plugins/fastestmirror/fastestmirror.py
index 998c0f5..cc9914e 100644
--- a/plugins/fastestmirror/fastestmirror.py
+++ b/plugins/fastestmirror/fastestmirror.py
@@ -73,7 +73,8 @@ def clean_hook(conduit):
conduit.info(2, "Cleaning up list of fastest mirrors")
os.unlink(hostfilepath)
-host = lambda mirror: mirror.split('/')[2]
+# Get the hostname from a url, stripping away any usernames/passwords
+host = lambda mirror: mirror.split('/')[2].split('@')[-1]
def postreposetup_hook(conduit):
global loadcache, exclude
commit 2f09ddae83cc5d21b565077a0fd4bb0363a787f4
Author: Luke Macken <lmacken at redhat.com>
Date: Mon Dec 17 16:06:42 2007 -0500
Only display our mirrors if we have some
diff --git a/plugins/fastestmirror/fastestmirror.py b/plugins/fastestmirror/fastestmirror.py
index 717beeb..998c0f5 100644
--- a/plugins/fastestmirror/fastestmirror.py
+++ b/plugins/fastestmirror/fastestmirror.py
@@ -94,7 +94,8 @@ def postreposetup_hook(conduit):
conduit.info(2, "Excluding mirror: %s" % host(mirror))
repomirrors[str(repo)].remove(mirror)
repo.urls = repomirrors[str(repo)]
- conduit.info(2, " * %s: %s" % (str(repo), host(repo.urls[0])))
+ if len(repo.urls):
+ conduit.info(2, " * %s: %s" % (str(repo), host(repo.urls[0])))
repo.failovermethod = 'priority'
repo.check()
repo.setupGrab()
More information about the Yum-cvs-commits
mailing list