Fix s3 delete.

This commit is contained in:
yackob03 2013-10-01 14:46:44 -04:00
parent f1e85bdcba
commit cbe0590ce5
3 changed files with 4 additions and 4 deletions

View file

@ -11,7 +11,7 @@ from util.gravatar import compute_hash
from auth.permissions import (ReadRepositoryPermission,
ModifyRepositoryPermission,
AdministerRepositoryPermission)
from endpoints.registry import delete_registry_storage
from endpoints import registry
logger = logging.getLogger(__name__)
@ -146,7 +146,7 @@ def delete_repository(namespace, repository):
permission = AdministerRepositoryPermission(namespace, repository)
if permission.can():
model.purge_repository(namespace, repository)
delete_registry_storage(namespace, repository)
registry.delete_repository_storage(namespace, repository)
return make_response('Deleted', 204)
abort(404)

View file

@ -304,7 +304,7 @@ def put_image_json(namespace, repository, image_id):
return make_response('true', 200)
def delete_registry_storage(namespace, repository):
def delete_repository_storage(namespace, repository):
""" Caller should have already verified proper permissions. """
repository_path = store.repository_namespace_path(namespace, repository)

View file

@ -116,7 +116,7 @@ class S3Storage(Storage):
# We assume it's a directory
if not path.endswith('/'):
path += '/'
for key in self._s3_bucket.list(prefix=path, delimiter='/'):
for key in self._s3_bucket.list(prefix=path):
key.delete()
def get_size(self, path):