Skip to content

Commit

Permalink
Prevent an array index exception if server does not have an image.
Browse files Browse the repository at this point in the history
Change-Id: I63d3a92cea4da042942540b0800b5c4e825983c5
Fixes: bug #1202784
  • Loading branch information
Nathan Beittenmiller committed Jul 18, 2013
1 parent 8914ed9 commit ef8ca80
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions openstack_dashboard/api/nova.py
Expand Up @@ -85,6 +85,8 @@ def __init__(self, apiresource, request):
def image_name(self):
import glanceclient.exc as glance_exceptions
from openstack_dashboard.api import glance
if not self.image:
return "(not found)"
try:
image = glance.image_get(self.request, self.image['id'])
return image.name
Expand Down

0 comments on commit ef8ca80

Please sign in to comment.