From 02518b2b72775d5d63deb78410a10fbc39db43ba Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Tue, 17 May 2016 19:34:01 +0200 Subject: [PATCH] Port vca_nat and vca_fw to py3 compatible syntax (#2243) Since they both depend on library that cannot run on python2.4, cf https://github.com/ansible/ansible/pull/15870, we can use directly the python 2.6 syntax, as seen on the porting doc. --- lib/ansible/modules/extras/cloud/vmware/vca_fw.py | 2 +- lib/ansible/modules/extras/cloud/vmware/vca_nat.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/extras/cloud/vmware/vca_fw.py b/lib/ansible/modules/extras/cloud/vmware/vca_fw.py index 90500a977cf..019cd2adb01 100644 --- a/lib/ansible/modules/extras/cloud/vmware/vca_fw.py +++ b/lib/ansible/modules/extras/cloud/vmware/vca_fw.py @@ -181,7 +181,7 @@ def main(): try: desired_rules = validate_fw_rules(fw_rules) - except VcaError, e: + except VcaError as e: module.fail_json(msg=e.message) result = dict(changed=False) diff --git a/lib/ansible/modules/extras/cloud/vmware/vca_nat.py b/lib/ansible/modules/extras/cloud/vmware/vca_nat.py index b7516d5448f..7dfa0cd3a67 100644 --- a/lib/ansible/modules/extras/cloud/vmware/vca_nat.py +++ b/lib/ansible/modules/extras/cloud/vmware/vca_nat.py @@ -154,7 +154,7 @@ def main(): try: desired_rules = validate_nat_rules(nat_rules) - except VcaError, e: + except VcaError as e: module.fail_json(msg=e.message) rules = gateway.get_nat_rules()