aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2013-10-16 02:16:53 -0700
committerBrian Dolbec <dolsen@gentoo.org>2013-10-16 02:16:53 -0700
commit3b46a1e2cc4179b47ce95b790431e22d81f209b3 (patch)
tree7ff5765f099bd14eeddb7dca3313e54a05f27b07
parentForce -o for -a + -r options to prevent multiple results being saved to the c... (diff)
downloadmirrorselect-3b46a1e2cc4179b47ce95b790431e22d81f209b3.tar.gz
mirrorselect-3b46a1e2cc4179b47ce95b790431e22d81f209b3.tar.bz2
mirrorselect-3b46a1e2cc4179b47ce95b790431e22d81f209b3.zip
Make the -r -a options select only the rotation server rather than force -o for screen output only.
-rwxr-xr-xmirrorselect/main.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/mirrorselect/main.py b/mirrorselect/main.py
index 5f7dc64..61fd5c2 100755
--- a/mirrorselect/main.py
+++ b/mirrorselect/main.py
@@ -244,7 +244,9 @@ class MirrorSelect(object):
group.add_option(
"-a", "--all_mirrors", action="store_true", default=False,
help="This will present a list of all filtered search results "
- "to make it possible to select mirrors you wish to use.")
+ "to make it possible to select mirrors you wish to use. "
+ " For the -r, --rsync option, it will select the rotation server "
+ "only. As multiple rsync URL's are not supported.")
group.add_option(
"-i", "--interactive", action="store_true", default=False,
help="Interactive Mode, this will present a list "
@@ -335,12 +337,6 @@ class MirrorSelect(object):
if options.rsync and not (options.interactive or options.all_mirrors):
self.output.print_err('rsync servers can only be selected with -i or -a')
- elif options.rsync and options.all_mirrors and not options.output:
- # force output to screen.
- # multiple uri's break normal sync operation
- options.output = True
- self.output.print_info("Forcing output to screen, as "
- "multiple rsync uris are not supported\n")
if options.interactive and (
options.deep or
@@ -429,7 +425,9 @@ class MirrorSelect(object):
hosts = self.get_available_hosts(options)
if options.all_mirrors:
- urls = [url for url, args in list(hosts)]
+ urls = sorted([url for url, args in list(hosts)])
+ if options.rsync:
+ urls = [urls[0]]
else:
urls = self.select_urls(hosts, options)