commit: 7caac017833b01e13028658effc502430c56d770 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> AuthorDate: Wed Jun 3 18:53:47 2020 +0000 Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org> CommitDate: Wed Jun 3 18:58:04 2020 +0000 URL: https://gitweb.gentoo.org/proj/mirrorselect.git/commit/?id=7caac017
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 <AT> gentoo.org> mirrorselect/main.py | 3 +++ 1 file changed, 3 insertions(+) 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