From e5ac8557e96ceae8f47bb6140c3eee0764fa06e9 Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Thu, 25 May 2017 18:24:43 +0200 Subject: [PATCH] Fix traceback for missing update --- cli/koji | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cli/koji b/cli/koji index 197364fa..f142af3b 100755 --- a/cli/koji +++ b/cli/koji @@ -3517,7 +3517,11 @@ def anon_handle_hostinfo(options, session, args): print("Enabled: %s" % (info['enabled'] and 'yes' or 'no')) print("Ready: %s" % (info['ready'] and 'yes' or 'no')) update = session.getLastHostUpdate(info['id']) - print("Last Update: %s" % update[:update.find('.')]) + if update is None: + update = "never" + else: + update = update[:update.find('.')] + print("Last Update: %s" % update) print("Channels: %s" % ' '.join([c['name'] for c in session.listChannels(hostID=info['id'])])) print("Active Buildroots:") states = {0:"INIT", 1:"WAITING", 2:"BUILDING"}