From a1482a124c28b667d1c3327f33d2599617276bd8 Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Jun 06 2017 09:59:06 +0000 Subject: Fix traceback for missing update --- diff --git a/cli/koji b/cli/koji index d3fc313..48414ce 100755 --- a/cli/koji +++ b/cli/koji @@ -3516,7 +3516,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"}