1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

changed deprecated channel_label attribute

This commit is contained in:
Pieter Avonts 2013-09-20 12:58:43 +02:00
parent a5ee6ff1e5
commit 60d8f92b3c

View file

@ -89,7 +89,10 @@ def unsubscribe_channels(channels, client, session, sysname, sys_id):
def base_channels(client, session, sys_id):
basechan = client.channel.software.listSystemChannels(session, sys_id)
chans = [item['channel_label'] for item in basechan]
try:
chans = [item['label'] for item in basechan]
except KeyError:
chans = [item['channel_label'] for item in basechan]
return chans
# ------------------------------------------------------- #