Fixing error exception handling for python3. Does not need to be compa… (#3840)

* Fixing error exception handling for python. Does not need to be compatible with Python2.4 b/c boto is Python 2.6 and above.

* Fixing error exception handling for python. Does not need to be compatible with Python2.4 b/c boto is Python 2.6 and above.

* Fixing compile time errors IRT error exception handling for Python 3.5.
This does not need to be compatible with Python2.4 b/c Boto is Python 2.6 and above.
This commit is contained in:
@ 2016-06-02 12:56:48 -07:00 committed by Matt Clay
parent 1573066ec1
commit 3fa745eef9
24 changed files with 173 additions and 173 deletions

View file

@ -247,7 +247,7 @@ def main():
try:
conn = connect_to_aws(boto.rds, region, **aws_connect_kwargs)
except boto.exception.BotoServerError, e:
except boto.exception.BotoServerError as e:
module.fail_json(msg = e.error_message)
group_was_added = False
@ -258,7 +258,7 @@ def main():
try:
all_groups = conn.get_all_dbparameter_groups(group_name, max_records=100)
exists = len(all_groups) > 0
except BotoServerError, e:
except BotoServerError as e:
if e.error_code != 'DBParameterGroupNotFound':
module.fail_json(msg = e.error_message)
exists = False
@ -287,10 +287,10 @@ def main():
else:
break
except BotoServerError, e:
except BotoServerError as e:
module.fail_json(msg = e.error_message)
except NotModifiableError, e:
except NotModifiableError as e:
msg = e.error_message
if group_was_added:
msg = '%s The group "%s" was added first.' % (msg, group_name)