diff options
author | Brian Dolbec <dolsen@gentoo.org> | 2013-10-15 07:38:26 -0700 |
---|---|---|
committer | Brian Dolbec <dolsen@gentoo.org> | 2013-10-15 07:38:26 -0700 |
commit | 31dbe7baaa693dc5180359c34549a267072599d4 (patch) | |
tree | 9822ba34df835eeae41ad3417836d8fa9bb4de41 | |
parent | fix some missed spaces in the help message (diff) | |
download | mirrorselect-31dbe7baaa693dc5180359c34549a267072599d4.tar.gz mirrorselect-31dbe7baaa693dc5180359c34549a267072599d4.tar.bz2 mirrorselect-31dbe7baaa693dc5180359c34549a267072599d4.zip |
add an -a, --all_mirrors option to dump all search results
-rwxr-xr-x | mirrorselect/main.py | 9 |
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) |