PR#438 Fix traceback for missing update
Merges #438 https://pagure.io/koji/pull-request/438
This commit is contained in:
commit
b297731d99
1 changed files with 5 additions and 1 deletions
6
cli/koji
6
cli/koji
|
|
@ -3517,7 +3517,11 @@ def anon_handle_hostinfo(options, session, args):
|
||||||
print("Enabled: %s" % (info['enabled'] and 'yes' or 'no'))
|
print("Enabled: %s" % (info['enabled'] and 'yes' or 'no'))
|
||||||
print("Ready: %s" % (info['ready'] and 'yes' or 'no'))
|
print("Ready: %s" % (info['ready'] and 'yes' or 'no'))
|
||||||
update = session.getLastHostUpdate(info['id'])
|
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("Channels: %s" % ' '.join([c['name'] for c in session.listChannels(hostID=info['id'])]))
|
||||||
print("Active Buildroots:")
|
print("Active Buildroots:")
|
||||||
states = {0:"INIT", 1:"WAITING", 2:"BUILDING"}
|
states = {0:"INIT", 1:"WAITING", 2:"BUILDING"}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue