

def get_raw_stats(self, host, port):
    data = ''
    try:
        if (port is None):
            sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
            sock.connect(host)
        else:
            sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
            sock.connect((host, int(port)))
        sock.send('stats\n')
        data = sock.recv(4096)
    except socket.error:
        host.log.exception('Failed to get stats from %s:%s', host, port)
    return data

dataset/ETHPy150Open python-diamond/Diamond/src/collectors/memcached/memcached.py MemcachedCollector.get_raw_stats/VarMisuse@112/128 `self`->`host`