From 41f0931f54b689238f980e869932d2eca8cbb27c Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Nov 12 2020 14:49:36 +0000 Subject: PR#2560: cli: allow removal of unused external repo even with --alltags Merges #2560 https://pagure.io/koji/pull-request/2560 Fixes: #2061 https://pagure.io/koji/issue/2061 cannot remove disassociated external repos --- diff --git a/cli/koji_cli/commands.py b/cli/koji_cli/commands.py index 9dd2367..3d3cd4a 100644 --- a/cli/koji_cli/commands.py +++ b/cli/koji_cli/commands.py @@ -5592,8 +5592,11 @@ def handle_remove_external_repo(goptions, session, args): if tags: parser.error(_("Do not specify tags when using --alltags")) if not current_tags: - print(_("External repo %s not associated with any tags") % repo) - return 0 + if options.force: + delete = True + else: + warn(_("External repo %s not associated with any tags") % repo) + return 0 tags = current_tags if delete: # removing entirely