From 9bdb567c56fa4f42aa650d1cc20a108f030fe45b Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Wed, 19 Oct 2016 11:46:25 +0200 Subject: [PATCH] Make netscaler pass python3 sanity check --- lib/ansible/modules/extras/network/citrix/netscaler.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/citrix/netscaler.py b/lib/ansible/modules/extras/network/citrix/netscaler.py index 384a625bdca..7954db89b7a 100644 --- a/lib/ansible/modules/extras/network/citrix/netscaler.py +++ b/lib/ansible/modules/extras/network/citrix/netscaler.py @@ -173,7 +173,8 @@ def main(): rc = 0 try: rc, result = core(module) - except Exception, e: + except Exception: + e = get_exception() module.fail_json(msg=str(e)) if rc != 0: @@ -186,4 +187,5 @@ def main(): # import module snippets from ansible.module_utils.basic import * from ansible.module_utils.urls 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 314b5c1f704..bce8225ce85 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 @@ -46,7 +46,6 @@ /monitoring/datadog_monitor.py /monitoring/rollbar_deployment.py /monitoring/stackdriver.py -/network/citrix/netscaler.py /network/cloudflare_dns.py /network/f5/bigip_gtm_virtual_server.py /network/f5/bigip_gtm_wide_ip.py