Merge "Handle errors during glance image updates correctly"
This commit is contained in:
commit
1f29fbd93e
@ -34,7 +34,6 @@ from django.core.files.uploadedfile import TemporaryUploadedFile
|
||||
import glanceclient as glance_client
|
||||
from six.moves import _thread as thread
|
||||
|
||||
from horizon import exceptions
|
||||
from horizon.utils import functions as utils
|
||||
from horizon.utils.memoized import memoized # noqa
|
||||
from openstack_dashboard.api import base
|
||||
@ -111,9 +110,7 @@ def image_list_detailed(request, marker=None, sort_dir='desc',
|
||||
def image_update(request, image_id, **kwargs):
|
||||
image_data = kwargs.get('data', None)
|
||||
try:
|
||||
image = glanceclient(request).images.update(image_id, **kwargs)
|
||||
except Exception:
|
||||
exceptions.handle(request, ignore=True)
|
||||
return glanceclient(request).images.update(image_id, **kwargs)
|
||||
finally:
|
||||
if image_data:
|
||||
try:
|
||||
@ -126,7 +123,6 @@ def image_update(request, image_id, **kwargs):
|
||||
'%(file)s (%(e)s)') %
|
||||
dict(file=filename, e=str(e)))
|
||||
LOG.warn(msg)
|
||||
return image
|
||||
|
||||
|
||||
def image_create(request, **kwargs):
|
||||
|
Loading…
x
Reference in New Issue
Block a user