

def wait_for_erlang_prompt(self):
    prompted = False
    buffer = ''
    while (not prompted):
        line = prompted._server.stdout.readline()
        if (len(line) > 0):
            buffer += line
        if re.search(('\\(%s\\)\\d+>' % self.vm_args['-name']), buffer):
            prompted = True
        if re.search('"Kernel pid terminated".*\\n', buffer):
            raise Exception('Riak test server failed to start.')

dataset/ETHPy150Open basho/riak-python-client/riak/test_server.py TestServer.wait_for_erlang_prompt/VarMisuse@28/37 `self`->`prompted`