From d0aff3a1a79ae51b33653a944c4f0fc127dd517f Mon Sep 17 00:00:00 2001 From: Matthias Runge Date: Thu, 10 Jan 2013 12:00:20 +0100 Subject: [PATCH] Catch another breakage, when cinder is unavailable During review of backporting avoid cinder calls, this has been discovered and should be applied to master branch. Fixes bug 1098146 Change-Id: I74c7fabd31ed333fc9f44ec92b2c391dd7c9b9ef --- openstack_dashboard/api/cinder.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openstack_dashboard/api/cinder.py b/openstack_dashboard/api/cinder.py index e913b9f80..3f9c1109e 100644 --- a/openstack_dashboard/api/cinder.py +++ b/openstack_dashboard/api/cinder.py @@ -65,7 +65,10 @@ def volume_list(request, search_opts=None): To see all volumes in the cloud as an admin you can pass in a special search option: {'all_tenants': 1} """ - return cinderclient(request).volumes.list(search_opts=search_opts) + c_client = cinderclient(request) + if c_client is None: + return [] + return c_client.volumes.list(search_opts=search_opts) def volume_get(request, volume_id):