From c06242382e4de3afb67f198f86cdab76c49b00fa Mon Sep 17 00:00:00 2001 From: Brian Waldon Date: Tue, 13 Dec 2011 13:38:10 -0500 Subject: [PATCH] Remove extra swift delete_object call This only tries to delete the manifest once when deleting an image stored (chunked) in swift. Fixes bug 903768. Change-Id: I65b8f3389e9965a111c4e774f4d1b6f7bbe71a9b --- glance/store/swift.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/glance/store/swift.py b/glance/store/swift.py index 9c42481263..f32b1724e2 100644 --- a/glance/store/swift.py +++ b/glance/store/swift.py @@ -472,7 +472,9 @@ def delete(self, location): # be hogging up network or file I/O here... swift_conn.delete_object(obj_container, segment['name']) - swift_conn.delete_object(loc.container, loc.obj) + else: + swift_conn.delete_object(loc.container, loc.obj) + except swift_client.ClientException, e: if e.http_status == httplib.NOT_FOUND: uri = location.get_store_uri()