Merge pull request #48 from spulec/py26
Now supporting Python 2.6 as long as we're using the very latest HTTPretty
This commit is contained in:
commit
d8ca75deaa
24 changed files with 85 additions and 64 deletions
|
|
@ -116,7 +116,7 @@ class S3Backend(BaseBackend):
|
|||
if delimiter and delimiter in key_without_prefix:
|
||||
# If delimiter, we need to split out folder_results
|
||||
key_without_delimiter = key_without_prefix.split(delimiter)[0]
|
||||
folder_results.add("{}{}{}".format(prefix, key_without_delimiter, delimiter))
|
||||
folder_results.add("{0}{1}{2}".format(prefix, key_without_delimiter, delimiter))
|
||||
else:
|
||||
key_results.add(key)
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ def _bucket_response(request, full_url, headers):
|
|||
new_key.set_metadata(meta_key, metadata)
|
||||
return 200, headers, ""
|
||||
else:
|
||||
raise NotImplementedError("Method {} has not been impelemented in the S3 backend yet".format(method))
|
||||
raise NotImplementedError("Method {0} has not been impelemented in the S3 backend yet".format(method))
|
||||
|
||||
|
||||
def key_response(request, full_url, headers):
|
||||
|
|
@ -172,7 +172,7 @@ def _key_response(request, full_url, headers):
|
|||
template = Template(S3_DELETE_OBJECT_SUCCESS)
|
||||
return 204, headers, template.render(bucket=removed_key)
|
||||
else:
|
||||
raise NotImplementedError("Method {} has not been impelemented in the S3 backend yet".format(method))
|
||||
raise NotImplementedError("Method {0} has not been impelemented in the S3 backend yet".format(method))
|
||||
|
||||
|
||||
S3_ALL_BUCKETS = """<ListAllMyBucketsResult xmlns="http://s3.amazonaws.com/doc/2006-03-01">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue