mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
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:
@@ -224,7 +224,7 @@ def create_launch_config(connection, module):
|
||||
connection.create_launch_configuration(lc)
|
||||
launch_configs = connection.get_all_launch_configurations(names=[name])
|
||||
changed = True
|
||||
except BotoServerError, e:
|
||||
except BotoServerError as e:
|
||||
module.fail_json(msg=str(e))
|
||||
|
||||
result = dict(
|
||||
@@ -303,7 +303,7 @@ def main():
|
||||
|
||||
try:
|
||||
connection = connect_to_aws(boto.ec2.autoscale, region, **aws_connect_params)
|
||||
except (boto.exception.NoAuthHandlerFound, AnsibleAWSError), e:
|
||||
except (boto.exception.NoAuthHandlerFound, AnsibleAWSError) as e:
|
||||
module.fail_json(msg=str(e))
|
||||
|
||||
state = module.params.get('state')
|
||||
|
||||
Reference in New Issue
Block a user