diff options
author | Michael Scherer <misc@zarb.org> | 2016-10-17 16:22:02 +0200 |
---|---|---|
committer | Michael Scherer <mscherer@users.noreply.github.com> | 2016-10-17 19:29:09 +0200 |
commit | efe82efb32e1045a73c4776d299d0ce9a6b944e6 (patch) | |
tree | 39ec9bf5fb3880fa8ab024ce1526d6a9c494f190 /notification | |
parent | 9897c502a6d8d851d96cfa577a54f25a272ac56b (diff) | |
download | ansible-modules-extras-efe82efb32e1045a73c4776d299d0ce9a6b944e6.tar.gz |
Make mqtt pass python3 sanity tests
Diffstat (limited to 'notification')
-rw-r--r-- | notification/mqtt.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/notification/mqtt.py b/notification/mqtt.py index 14713c2b..89fa50a7 100644 --- a/notification/mqtt.py +++ b/notification/mqtt.py @@ -156,11 +156,13 @@ def main(): hostname=server, port=port, auth=auth) - except Exception, e: + except Exception: + e = get_exception() module.fail_json(msg="unable to publish to MQTT broker %s" % (e)) module.exit_json(changed=False, topic=topic) # import module snippets from ansible.module_utils.basic import * +from ansible.module_utils.pycompat24 import get_exception main() |