From 7ba3e93e2092951d5806a7bd537a67c0c88cd992 Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Nov 23 2020 08:12:51 +0000 Subject: PR#2577: fix not found build id error for list-builds Merges #2577 https://pagure.io/koji/pull-request/2577 Fixes: #2487 https://pagure.io/koji/issue/2487 cli: list-builds --buildid throws AttributeError --- diff --git a/cli/koji_cli/commands.py b/cli/koji_cli/commands.py index a8a249a..33249f1 100644 --- a/cli/koji_cli/commands.py +++ b/cli/koji_cli/commands.py @@ -3101,8 +3101,8 @@ def anon_handle_list_builds(goptions, session, args): except ValueError: buildid = options.buildid data = [session.getBuild(buildid)] - if data is None: - parser.error(_("Invalid build ID")) + if data[0] is None: + parser.error(_("No build with ID '%s'" % buildid)) else: # Check filter exists if any(opts):