def confirm_xxnet_exit():
 is_xxnet_exit = False
 xlog.debug('start confirm_xxnet_exit')
 for i in range(30):
  if (http_request('http://127.0.0.1:8087/quit') == False):
   xlog.debug('good, xxnet:8087 cleared!')
   is_xxnet_exit = True
   break
  else:
   xlog.debug(('<%d>: try to terminate xxnet:8087' % i))
  time.sleep(1)
 for i in range(30):
  host_port = config.get(['modules', 'launcher', 'control_port'], 8085)
  req_url = 'http://127.0.0.1:{port}/quit'.format(port=host_port)
  if (http_request(req_url) == False):
   xlog.debug(('good, xxnet:%s clear!' % host_port))
   is_xxnet_exit = True
   break
  else:
   xlog.debug(('<%d>: try to terminate xxnet:%s' % (i, host_port)))
  time.sleep(1)
 xlog.debug('finished confirm_xxnet_exit')
 return is_xxnet_exit

def confirm_xxnet_exit ( ) : is_xxnet_exit = False xlog . debug ( 'start confirm_xxnet_exit' ) for i in range ( 30 ) : if ( http_request ( 'http://127.0.0.1:8087/quit' ) == False ) : xlog . debug ( 'good, xxnet:8087 cleared!' ) is_xxnet_exit = True break else : xlog . debug ( ( '<%d>: try to terminate xxnet:8087' % i ) ) time . sleep ( 1 ) for i in range ( 30 ) : host_port = config . get ( [ 'modules' , 'launcher' , 'control_port' ] , 8085 ) req_url = 'http://127.0.0.1:{port}/quit' . format ( port = host_port ) if ( http_request ( req_url ) == False ) : xlog . debug ( ( 'good, xxnet:%s clear!' % host_port ) ) is_xxnet_exit = True break else : xlog . debug ( ( '<%d>: try to terminate xxnet:%s' % ( i , host_port ) ) ) time . sleep ( 1 ) xlog . debug ( 'finished confirm_xxnet_exit' ) return is_xxnet_exit
suppose xxnet is running .