Ignore cinder access exception in cleanup

Change-Id: Ib96d0ee37839c87564026a67a87abef41b227d5a
This commit is contained in:
ahothan 2016-07-15 19:03:21 -07:00
parent 26b38f11d3
commit 8bfe3f694a
1 changed files with 8 additions and 4 deletions

View File

@ -75,10 +75,14 @@ def prompt_to_run():
sys.exit(0)
def fetch_resources(fetcher, options=None):
if options:
res_list = fetcher(search_opts=options)
else:
res_list = fetcher()
try:
if options:
res_list = fetcher(search_opts=options)
else:
res_list = fetcher()
except Exception as e:
res_list = []
print "Warning exception while listing resources:" + str(e)
resources = {}
for res in res_list:
# some objects provide direct access some