aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2013-10-15 07:38:26 -0700
committerBrian Dolbec <dolsen@gentoo.org>2013-10-15 07:38:26 -0700
commit31dbe7baaa693dc5180359c34549a267072599d4 (patch)
tree9822ba34df835eeae41ad3417836d8fa9bb4de41
parentfix some missed spaces in the help message (diff)
downloadmirrorselect-31dbe7baaa693dc5180359c34549a267072599d4.tar.gz
mirrorselect-31dbe7baaa693dc5180359c34549a267072599d4.tar.bz2
mirrorselect-31dbe7baaa693dc5180359c34549a267072599d4.zip
add an -a, --all_mirrors option to dump all search results
-rwxr-xr-xmirrorselect/main.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/mirrorselect/main.py b/mirrorselect/main.py
index 034a8de..cfdcd55 100755
--- a/mirrorselect/main.py
+++ b/mirrorselect/main.py
@@ -242,6 +242,10 @@ class MirrorSelect(object):
group = parser.add_option_group("Main modes")
group.add_option(
+ "-a", "--all_mirrors", action="store_true", default=False,
+ help="This will present a list of all results"
+ "to make it possible to select mirrors you wish to use.")
+ group.add_option(
"-i", "--interactive", action="store_true", default=False,
help="Interactive Mode, this will present a list "
"to make it possible to select mirrors you wish to use.")
@@ -418,7 +422,10 @@ class MirrorSelect(object):
hosts = self.get_available_hosts(options)
- urls = self.select_urls(hosts, options)
+ if options.all_mirrors:
+ urls = [url for url, args in list(hosts)]
+ else:
+ urls = self.select_urls(hosts, options)
self.write_config(fsmirrors + urls, options.output,
config_path, options.rsync)