Don't raise or catch StandardError in amazon modules

This commit is contained in:
Toshio Kuratomi 2015-11-30 19:01:57 -08:00 committed by Matt Clay
commit 5bd1bcaa2d
15 changed files with 164 additions and 176 deletions

View file

@ -123,7 +123,7 @@ def main():
if region:
try:
connection = connect_to_aws(boto.ec2, region, **aws_connect_params)
except (boto.exception.NoAuthHandlerFound, StandardError), e:
except (boto.exception.NoAuthHandlerFound, AnsibleAWSError), e:
module.fail_json(msg=str(e))
else:
module.fail_json(msg="region must be specified")