Comment 2 for bug 1310952

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/89499
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=8241aef9291ba554f891da2d994c4b0795ef8002
Submitter: Jenkins
Branch: master

commit 8241aef9291ba554f891da2d994c4b0795ef8002
Author: Sergey Nikitin <email address hidden>
Date: Tue Apr 22 11:53:44 2014 +0400

    Assign local variable in api.v2.image_data

    If local variable 'image' will be not initialized we get UnboundLocalError
    while handle following exceptions:
    exception.StorageFull
    exception.StorageQuotaFull
    exception.ImageSizeLimitExceeded
    exception.StorageWriteDenied
    webob.exc.HTTPError
    ValueError

    This is because not initialized variable 'image' used as argument of
    method _restore. That is why we should initialize it.

    Closes-Bug: #1310952

    Change-Id: I3bf73ca272aad479416067495006476934a01dd9