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.
pull/18777/head
Michael Scherer 9 years ago committed by Matt Clay
parent d7ac2a8499
commit 02518b2b72

@ -181,7 +181,7 @@ def main():
try: try:
desired_rules = validate_fw_rules(fw_rules) desired_rules = validate_fw_rules(fw_rules)
except VcaError, e: except VcaError as e:
module.fail_json(msg=e.message) module.fail_json(msg=e.message)
result = dict(changed=False) result = dict(changed=False)

@ -154,7 +154,7 @@ def main():
try: try:
desired_rules = validate_nat_rules(nat_rules) desired_rules = validate_nat_rules(nat_rules)
except VcaError, e: except VcaError as e:
module.fail_json(msg=e.message) module.fail_json(msg=e.message)
rules = gateway.get_nat_rules() rules = gateway.get_nat_rules()

Loading…
Cancel
Save