cli: buildinfo returns error for non exist build
Fixes: https://pagure.io/koji/issue/2762
This commit is contained in:
parent
f7a6338483
commit
b9f261d8de
2 changed files with 123 additions and 0 deletions
|
|
@ -3227,12 +3227,14 @@ def anon_handle_buildinfo(goptions, session, args):
|
|||
if len(args) < 1:
|
||||
parser.error(_("Please specify a build"))
|
||||
ensure_connection(session, goptions)
|
||||
error_hit = False
|
||||
for build in args:
|
||||
if build.isdigit():
|
||||
build = int(build)
|
||||
info = session.getBuild(build)
|
||||
if info is None:
|
||||
warn("No such build: %s\n" % build)
|
||||
error_hit = True
|
||||
continue
|
||||
task = None
|
||||
if info['task_id']:
|
||||
|
|
@ -3315,6 +3317,8 @@ def anon_handle_buildinfo(goptions, session, args):
|
|||
if changelog:
|
||||
print("Changelog:")
|
||||
print(koji.util.formatChangelog(changelog))
|
||||
if error_hit:
|
||||
error()
|
||||
|
||||
|
||||
def anon_handle_hostinfo(goptions, session, args):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue