

def _parse_response(self, file, sock, encoding):
    (p, u) = self.getparser(encoding)
    while 1:
        if sock:
            response = sock.recv(1024)
        else:
            response = file.read(1024)
        if (not response):
            break
        if self.verbose:
            print('body:', repr(response))
        p.feed(response)
    file.close()
    p.close()
    return u.close()

dataset/ETHPy150Open circuits/circuits/tests/web/jsonrpclib.py Transport._parse_response/original