

def head(key):
    "\n    Make a HEAD request for an object in S3.  This is needed to find the\n    object's length so it can be accounted.  This function makes one\n    billable request and anticipates another.\n    "
    librato.count('blueprint-io-server.requests.head')
    statsd.increment('blueprint-io-server.requests.head')
    c = boto.connect_s3(access_key, secret_key)
    b = c.get_bucket(bucket, validate=False)
    try:
        k = k.get_key(key)
        if (k is None):
            return None
        return k.size
    except (boto.exception.BotoClientError, boto.exception.BotoServerError, httplib.HTTPException, socket.error, socket.gaierror):
        return False

dataset/ETHPy150Open devstructure/blueprint/blueprint/io/server/backend.py head/VarMisuse@56/167 `b`->`k`