mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 05:40:23 -07:00
Fix for "cannot marshal None unless.." (#33660)
when using only an activation key without any channels. As already suggested by mattclay in https://github.com/ansible/ansible/pull/25079 and also patch unit test for rhn_register and add test case for activationkey only
This commit is contained in:
parent
5b19d67873
commit
d68c734ae2
2 changed files with 24 additions and 2 deletions
|
@ -292,6 +292,8 @@ class Rhn(redhat.RegistrationBase):
|
|||
os.unlink(self.config['systemIdPath'])
|
||||
|
||||
def subscribe(self, channels):
|
||||
if not channels:
|
||||
return
|
||||
if self._is_hosted():
|
||||
current_channels = self.api('channel.software.listSystemChannels', self.systemid)
|
||||
new_channels = [item['channel_label'] for item in current_channels]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue