Commit 898889d2 by Bruce Pennypacker

added try/except around conn.get_all_dbinstances

parent d25622f1
......@@ -463,8 +463,12 @@ def main():
if command == 'delete' and not wait:
module.exit_json(changed=True)
instances = conn.get_all_dbinstances(instance_name)
my_inst = instances[0]
try:
instances = conn.get_all_dbinstances(instance_name)
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
if wait:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment