diff options
author | Brian Dolbec <dolsen@gentoo.org> | 2013-10-16 01:33:40 -0700 |
---|---|---|
committer | Brian Dolbec <dolsen@gentoo.org> | 2013-10-16 01:33:40 -0700 |
commit | a56a352e92b8a5fc06e83e91aa97994071f1742b (patch) | |
tree | 699b1b73a29c6c1c766172c67d767b771ddfcb3d /mirrorselect | |
parent | Add -a to rsync sanity checks. (diff) | |
download | mirrorselect-a56a352e92b8a5fc06e83e91aa97994071f1742b.tar.gz mirrorselect-a56a352e92b8a5fc06e83e91aa97994071f1742b.tar.bz2 mirrorselect-a56a352e92b8a5fc06e83e91aa97994071f1742b.zip |
Fix IndexError for zero length search results.
Diffstat (limited to 'mirrorselect')
-rwxr-xr-x | mirrorselect/main.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mirrorselect/main.py b/mirrorselect/main.py index 45cc30b..6a9c43d 100755 --- a/mirrorselect/main.py +++ b/mirrorselect/main.py @@ -427,6 +427,9 @@ class MirrorSelect(object): else: urls = self.select_urls(hosts, options) - self.write_config(fsmirrors + urls, options.output, - config_path, options.rsync) - + if len(urls): + self.write_config(fsmirrors + urls, options.output, + config_path, options.rsync) + else: + self.output.write("No search results found. " + "Check your filter settings and re-run mirrorselect\n") |