cli: allow removal of unused external repo even with --alltags

Fixes: https://pagure.io/koji/issue/2061
This commit is contained in:
Tomas Kopecek 2020-10-27 13:55:03 +01:00
parent 3b2b7ceac4
commit 7f44d1f7a2

View file

@ -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