Merge pull request #34529 from maran/master

cephadm: warn when no valid version arguments are supplied to add-repo

Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
This commit is contained in:
Sebastian Wagner 2020-04-15 12:56:03 +02:00 committed by GitHub
commit a07f2d6ebe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3992,6 +3992,8 @@ def create_packager(stable=None, version=None, branch=None, commit=None):
def command_add_repo():
if args.version and args.release:
raise Error('you can specify either --release or --version but not both')
if not args.version and not args.release and not args.dev and not args.dev_commit:
raise Error('please supply a --release, --version, --dev or --dev-commit argument')
if args.version:
try:
(x, y, z) = args.version.split('.')