示例#1
0
def delete(client, object):
    path = object.url.path
    r = client.delete(path)

    #TODO: find out why we get 404
    if r.status != 204 and r.status != 404:
        raise error.DeleteError(r.raw)
示例#2
0
    def delete(self):
        """
        Delete the object.
        """
        if self.url is not None:
            r = self.client.delete(self.url)

            # TODO: find out why we get 404
            if r.status not in (200, 204, 404):
                raise error.DeleteError(errmsg(r))