def delete(key):
    """
    Remove an object from S3.  DELETE requests are free but this function
    still makes one billable request to account for freed storage.
    """
    content_length = head(key)
    if content_length is None:
        return None
    librato.count('blueprint-io-server.requests.delete')
    statsd.increment('blueprint-io-server.requests.delete')
    c = boto.connect_s3(access_key, secret_key)
    b = c.get_bucket(bucket, validate=False)
    try:
        b.delete_key(key)
        # TODO librato.something('blueprint-io-server.storage', -content_length)
        statsd.update('blueprint-io-server.storage', -content_length)
    except (boto.exception.BotoClientError,
            boto.exception.BotoServerError,
            boto.exception.S3ResponseError,
            httplib.HTTPException,
            socket.error,
            socket.gaierror):
        return False
dataset/ETHPy150Open devstructure/blueprint/blueprint/io/server/backend.py/delete/original