1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

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.
This commit is contained in:
Michael Scherer 2016-05-17 19:34:01 +02:00 committed by Matt Clay
parent d7ac2a8499
commit 02518b2b72
2 changed files with 2 additions and 2 deletions

View file

@ -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)

View file

@ -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()