cli: mock-config error for non existing buildroot
When buildroot is not existing, mock-config returns an error. Fixes: https://pagure.io/koji/issue/2642
This commit is contained in:
parent
50db3b92d8
commit
dc5230c4ba
2 changed files with 12 additions and 0 deletions
|
|
@ -948,6 +948,8 @@ def anon_handle_mock_config(goptions, session, args):
|
|||
except ValueError:
|
||||
parser.error(_("Buildroot id must be an integer"))
|
||||
brootinfo = session.getBuildroot(br_id)
|
||||
if brootinfo is None:
|
||||
error(_("No such buildroot: %r") % br_id)
|
||||
if options.latest:
|
||||
opts['repoid'] = 'latest'
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue