From adc62226d42117909b749e20608c440f7484ef25 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Sun, 16 Oct 2016 09:53:19 +0200 Subject: [PATCH] Make dnssimple compile on python 3 --- lib/ansible/modules/extras/network/dnsimple.py | 4 +++- .../extras/test/utils/shippable/sanity-skip-python3.txt | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/extras/network/dnsimple.py b/lib/ansible/modules/extras/network/dnsimple.py index 0825f4ba30b..ec7478d7e26 100644 --- a/lib/ansible/modules/extras/network/dnsimple.py +++ b/lib/ansible/modules/extras/network/dnsimple.py @@ -294,12 +294,14 @@ def main(): else: module.fail_json(msg="'%s' is an unknown value for the state argument" % state) - except DNSimpleException, e: + except DNSimpleException: + e = get_exception() module.fail_json(msg="Unable to contact DNSimple: %s" % e.message) module.fail_json(msg="Unknown what you wanted me to do") # import module snippets from ansible.module_utils.basic import * +from ansible.module_utils.pycompat24 import get_exception main() diff --git a/lib/ansible/modules/extras/test/utils/shippable/sanity-skip-python3.txt b/lib/ansible/modules/extras/test/utils/shippable/sanity-skip-python3.txt index a8bbef1cc34..c7ed2636df0 100644 --- a/lib/ansible/modules/extras/test/utils/shippable/sanity-skip-python3.txt +++ b/lib/ansible/modules/extras/test/utils/shippable/sanity-skip-python3.txt @@ -62,7 +62,6 @@ /monitoring/zabbix_screen.py /network/citrix/netscaler.py /network/cloudflare_dns.py -/network/dnsimple.py /network/dnsmadeeasy.py /network/f5/bigip_gtm_virtual_server.py /network/f5/bigip_gtm_wide_ip.py