aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2013-10-16 01:33:40 -0700
committerBrian Dolbec <dolsen@gentoo.org>2013-10-16 01:33:40 -0700
commita56a352e92b8a5fc06e83e91aa97994071f1742b (patch)
tree699b1b73a29c6c1c766172c67d767b771ddfcb3d /mirrorselect
parentAdd -a to rsync sanity checks. (diff)
downloadmirrorselect-a56a352e92b8a5fc06e83e91aa97994071f1742b.tar.gz
mirrorselect-a56a352e92b8a5fc06e83e91aa97994071f1742b.tar.bz2
mirrorselect-a56a352e92b8a5fc06e83e91aa97994071f1742b.zip
Fix IndexError for zero length search results.
Diffstat (limited to 'mirrorselect')
-rwxr-xr-xmirrorselect/main.py9
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")