def _bucket_response_delete_keys(self, request, body, bucket_name):
    template = self.response_template(S3_DELETE_KEYS_RESPONSE)
    body_dict = xmltodict.parse(body, strip_whitespace=False)
    objects = body_dict['Delete'].get('Object', [])
    if (not isinstance(objects, list)):
        objects = [objects]
    if (len(objects) == 0):
        raise MalformedXML()
    deleted_objects = self.backend.delete_objects(bucket_name, objects)
    error_names = []
    return (200, {}, template.render(deleted=deleted_objects, delete_errors=error_names))
def _bucket_response_delete_keys(self, request, body, bucket_name):
    template = self.response_template(S3_DELETE_KEYS_RESPONSE)
    body_dict = xmltodict.parse(body, strip_whitespace=False)
    objects = body_dict['Delete'].get('Object', [])
    if (not isinstance(objects, list)):
        objects = [objects]
    if (len(objects) == 0):
        raise MalformedXML()
    deleted_objects = self.backend.delete_objects(bucket_name, objects)
    error_names = []
    return (200, {}, template.render(deleted=deleted_objects, delete_errors=error_names))