Fix disabled and enabled option when empty result
Fixes: https://pagure.io/koji/issue/3015
This commit is contained in:
parent
2116f565a5
commit
b79f8e0462
1 changed files with 4 additions and 1 deletions
|
|
@ -3013,7 +3013,10 @@ def anon_handle_list_channels(goptions, session, args):
|
|||
channels = sorted([x for x in session.listChannels(**opts)], key=lambda x: x['name'])
|
||||
except koji.ParameterError:
|
||||
channels = sorted([x for x in session.listChannels()], key=lambda x: x['name'])
|
||||
first_item = channels[0]
|
||||
if len(channels) > 0:
|
||||
first_item = channels[0]
|
||||
else:
|
||||
first_item = {}
|
||||
session.multicall = True
|
||||
for channel in channels:
|
||||
session.listHosts(channelID=channel['id'])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue