mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Make mqtt pass python3 sanity tests
This commit is contained in:
parent
3c1dea1933
commit
b902ea297f
2 changed files with 3 additions and 2 deletions
|
@ -156,11 +156,13 @@ def main():
|
||||||
hostname=server,
|
hostname=server,
|
||||||
port=port,
|
port=port,
|
||||||
auth=auth)
|
auth=auth)
|
||||||
except Exception, e:
|
except Exception:
|
||||||
|
e = get_exception()
|
||||||
module.fail_json(msg="unable to publish to MQTT broker %s" % (e))
|
module.fail_json(msg="unable to publish to MQTT broker %s" % (e))
|
||||||
|
|
||||||
module.exit_json(changed=False, topic=topic)
|
module.exit_json(changed=False, topic=topic)
|
||||||
|
|
||||||
# import module snippets
|
# import module snippets
|
||||||
from ansible.module_utils.basic import *
|
from ansible.module_utils.basic import *
|
||||||
|
from ansible.module_utils.pycompat24 import get_exception
|
||||||
main()
|
main()
|
||||||
|
|
|
@ -66,4 +66,3 @@
|
||||||
/network/openvswitch_port.py
|
/network/openvswitch_port.py
|
||||||
/notification/jabber.py
|
/notification/jabber.py
|
||||||
/notification/mail.py
|
/notification/mail.py
|
||||||
/notification/mqtt.py
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue