Skip to content

Commit

Permalink
Remove extra swift delete_object call
Browse files Browse the repository at this point in the history
This only tries to delete the manifest once when deleting an image
stored (chunked) in swift. Fixes bug 903768.

(cherry picked from commit c062423)

Change-Id: I65b8f3389e9965a111c4e774f4d1b6f7bbe71a9b
  • Loading branch information
Brian Waldon authored and markmc committed Jan 11, 2012
1 parent 34aa896 commit c15c8d0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion glance/store/swift.py
Expand Up @@ -453,7 +453,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()
Expand Down

0 comments on commit c15c8d0

Please sign in to comment.