def _wait_for_master(self):
def validator():<EOL><INDENT>resp = self.conn_pool.urlopen(<EOL>'<STR_LIT:POST>',<EOL>'<STR_LIT>'.format(server=self.http_url),<EOL>headers={'<STR_LIT:Content-Type>': '<STR_LIT:application/json>'},<EOL>body='<STR_LIT>'<EOL>)<EOL>data = json.loads(resp.data.decode('<STR_LIT:utf-8>'))<EOL>return resp.status == <NUM_LIT:200> and data['<STR_LIT>'][<NUM_LIT:0>][<NUM_LIT:0>]<EOL><DEDENT>self._wait_for(validator)<EOL>
Wait for master node