From 29009533e5c788f468cd8cbf8f18047a5825ab18 Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Nov 11 2020 12:41:03 +0000 Subject: cli: allow removal of unused external repo even with --alltags Fixes: https://pagure.io/koji/issue/2061 --- diff --git a/cli/koji_cli/commands.py b/cli/koji_cli/commands.py index b43745e..ad02dfd 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