fix not found build id error for list-builds

This commit is contained in:
lrossett 2020-11-17 15:15:18 -03:00 committed by Tomas Kopecek
parent 838c3781ff
commit 3c1c1bd5c4

View file

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