From 1bcc8c6433c29cc6846ccc9452c0fc58421111b7 Mon Sep 17 00:00:00 2001 From: Xibo Ning Date: Wed, 7 Sep 2016 17:22:16 +0800 Subject: [PATCH] have koji to gracefully hanle noneexistent tasks --- cli/koji | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cli/koji b/cli/koji index 9cfae798..4b5a23d2 100755 --- a/cli/koji +++ b/cli/koji @@ -4415,6 +4415,10 @@ def _printTaskInfo(session, task_id, level=0, recurse=True, verbose=True): indent = " "*2*level info = session.getTaskInfo(task_id) + + if info is None: + raise koji.GenericError, "No such task: %d" % task_id + if info['host_id']: host_info = session.getHost(info['host_id']) else: