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

@ -182,7 +182,7 @@ def main():
if region:
try:
connection = connect_to_aws(boto.ec2.elb, 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")
@ -192,4 +192,5 @@ def main():
from ansible.module_utils.basic import *
from ansible.module_utils.ec2 import *
main()
if __name__ == '__main__':
main()