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

added try/except around conn.get_all_dbinstances

This commit is contained in:
Bruce Pennypacker 2013-06-17 09:42:42 -04:00
parent d25622f17e
commit 898889d20e

View file

@ -463,8 +463,12 @@ def main():
if command == 'delete' and not wait: if command == 'delete' and not wait:
module.exit_json(changed=True) module.exit_json(changed=True)
try:
instances = conn.get_all_dbinstances(instance_name) instances = conn.get_all_dbinstances(instance_name)
my_inst = instances[0] my_inst = instances[0]
except boto.exception.BotoServerError, e:
module.fail_json(msg = e.error_message)
# Wait for the instance to be available if requested # Wait for the instance to be available if requested
if wait: if wait: