aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2020-06-03 11:53:47 -0700
committerBrian Dolbec <dolsen@gentoo.org>2020-06-03 11:58:04 -0700
commit7caac017833b01e13028658effc502430c56d770 (patch)
tree06184c54ce40d0556dc6f3fd284b428309ecb23d
parentwrite_make_conf: fix infinite loop (bug 698470) (diff)
downloadmirrorselect-7caac017833b01e13028658effc502430c56d770.tar.gz
mirrorselect-7caac017833b01e13028658effc502430c56d770.tar.bz2
mirrorselect-7caac017833b01e13028658effc502430c56d770.zip
main.py: Add a -a, -s combo sanity check
This is to prevent all mirrors from being added to make.conf when the -s option is also enabled. The -a option takes priority in the code, so there is never any selection done. This options check will error out when both options are enabled. Reported by: toralf on #gentoo-dev Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
-rwxr-xr-xmirrorselect/main.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/mirrorselect/main.py b/mirrorselect/main.py
index b49461b..c4f649f 100755
--- a/mirrorselect/main.py
+++ b/mirrorselect/main.py
@@ -271,6 +271,9 @@ 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')
+ if options.servers and options.all_mirrors:
+ self.output.print_err('Choose at most one of -s or -a')
+
if options.interactive and (
options.deep or
options.blocksize or