From 0b64077bbd4b66b41f9c3143f8096a486f539e08 Mon Sep 17 00:00:00 2001 From: Bruce Pennypacker Date: Mon, 17 Jun 2013 09:42:42 -0400 Subject: [PATCH] added try/except around conn.get_all_dbinstances --- cloud/rds | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cloud/rds b/cloud/rds index 7d6e0e6ce75..bd2490a0fbf 100644 --- a/cloud/rds +++ b/cloud/rds @@ -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: