#3016 Fix disabled and enabled option when empty result + fix list-hosts shows * with disabled channels
Merged 2 years ago by tkopecek. Opened 2 years ago by jcupova.
jcupova/koji issue-3015  into  master

file modified
+5 -2
@@ -3013,7 +3013,10 @@ 

          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'])
@@ -3137,7 +3140,7 @@ 

      if options.show_channels:

          with session.multicall() as m:

              result = [m.listChannels(host['id']) for host in hosts]

-         first_line_channel = result[0].result

+         first_line_channel = result[0].result[0]

          for host, channels in zip(hosts, result):

              list_channels = []

              for c in channels.result:

1 new commit added

  • Fix list-hosts with show-channels shows * with disabled channels
2 years ago

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

2 years ago

Commit 98c687f fixes this pull-request

Pull-Request has been merged by tkopecek

2 years ago

Metadata Update from @mfilip:
- Pull-request tagged with: testing-done

2 years ago