Merge "fix stale libvirt images on download failure. Bug 801412"

This commit is contained in:
Jenkins
2012年02月02日 23:14:31 +00:00
committed by Gerrit Code Review

View File

@@ -41,8 +41,12 @@ def fetch(context, image_href, path, _user_id, _project_id):
# checked before we got here.
(image_service, image_id) = nova.image.get_image_service(context,
image_href)
with open(path, "wb") as image_file:
metadata = image_service.get(context, image_id, image_file)
try:
with open(path, "wb") as image_file:
metadata = image_service.get(context, image_id, image_file)
except Exception:
os.unlink(path)
raise
return metadata
Reference in New Issue
openstack/nova
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.

The note is not visible to the blocked user.