(bucket, key_list)
| 860 | def object_batch_delete_uri_strs(self, uris): |
| 861 | """ Batch delete given a list of object uris """ |
| 862 | def compose_batch_del_xml(bucket, key_list): |
| 863 | body = u"<?xml version=\"1.0\" encoding=\"UTF-8\"?><Delete>" |
| 864 | for key in key_list: |
| 865 | uri = S3Uri(key) |
| 866 | if uri.type != "s3": |
| 867 | raise ValueError("Expected URI type 's3', got '%s'" % uri.type) |
| 868 | if not uri.has_object(): |
| 869 | raise ValueError("URI '%s' has no object" % key) |
| 870 | if uri.bucket() != bucket: |
| 871 | raise ValueError("The batch should contain keys from the same bucket") |
| 872 | object = saxutils.escape(uri.object()) |
| 873 | body += u"<Object><Key>%s</Key></Object>" % object |
| 874 | body += u"</Delete>" |
| 875 | body = encode_to_s3(body) |
| 876 | return body |
| 877 | |
| 878 | batch = uris |
| 879 | if len(batch) == 0: |
nothing calls this directly
no test coverage detected