summaryrefslogtreecommitdiff
path: root/tuskar_ui/infrastructure/overcloud/views.py
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2014-04-09 15:29:06 +0000
committerGerrit Code Review <review@openstack.org>2014-04-09 15:29:06 +0000
commit9db0e052d80cd708ec08afbb01c89cd642285a87 (patch)
tree7c6347e981f587c1136b3db337b23de22b690511 /tuskar_ui/infrastructure/overcloud/views.py
parent68e93e0701657592dc34404a74b31ac8e5eaf50a (diff)
parent3d7dc492a76836248e5f4c771467267902fcef77 (diff)
downloadtuskar-ui-9db0e052d80cd708ec08afbb01c89cd642285a87.tar.gz
Merge "Fix error when viewing role with no flavor"
Diffstat (limited to 'tuskar_ui/infrastructure/overcloud/views.py')
-rw-r--r--tuskar_ui/infrastructure/overcloud/views.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tuskar_ui/infrastructure/overcloud/views.py b/tuskar_ui/infrastructure/overcloud/views.py
index 1ee0982e..72e44dd5 100644
--- a/tuskar_ui/infrastructure/overcloud/views.py
+++ b/tuskar_ui/infrastructure/overcloud/views.py
@@ -11,6 +11,7 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
+import novaclient
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext_lazy as _
@@ -171,6 +172,8 @@ class OvercloudRoleView(horizon_tables.DataTableView,
try:
context['flavor'] = nova.flavor_get(self.request, role.flavor_id)
+ except novaclient.exceptions.NotFound:
+ context['flavor'] = None
except Exception:
msg = _('Unable to retrieve flavor.')
horizon.exceptions.handle(self.request, msg)