mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
added try/except around conn.get_all_dbinstances
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user