Fix exit_json usage: really call client.auth.logout

This commit is contained in:
Pierre-Louis Bonicoli 2017-07-15 03:42:53 +02:00 committed by Toshio Kuratomi
commit f9404b0d85

View file

@ -131,7 +131,7 @@ def main():
# get channels for system
chans = base_channels(client, session, sys_id)
try:
if state == 'present':
if channelname in chans:
module.exit_json(changed=False, msg="Channel %s already exists" % channelname)
@ -145,7 +145,7 @@ def main():
else:
unsubscribe_channels(channelname, client, session, systname, sys_id)
module.exit_json(changed=True, msg="Channel %s removed" % channelname)
finally:
client.auth.logout(session)