From 84ec0c8fafbac43d64ce9adf3a741c97b433f64b 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. --- cloud/vmware/vca_fw.py | 2 +- cloud/vmware/vca_nat.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cloud/vmware/vca_fw.py b/cloud/vmware/vca_fw.py index 30bb16b6a27..617430abf25 100644 --- a/cloud/vmware/vca_fw.py +++ b/cloud/vmware/vca_fw.py @@ -184,7 +184,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/cloud/vmware/vca_nat.py b/cloud/vmware/vca_nat.py index b7516d5448f..7dfa0cd3a67 100644 --- a/cloud/vmware/vca_nat.py +++ b/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()