parameters: (self, timeout=10)
docstring: Start TsProxy server and verify that it started.
docstring_summary: Start TsProxy server and verify that it started.
docstring_tokens: Start TsProxy server and verify that it started .
function: def StartServer(self, timeout=10):
      """Start TsProxy server and verify that it started.
      """
      cmd_line = [sys.executable, _TSPROXY_PATH]
      cmd_line.extend([
          '--port=0',  # Use port 0 so tsproxy picks a random available port.
          '--mapports=4a43:%s,*:%s' % (self._https_port, self._http_port)
          ])
      logging.info('Tsproxy commandline: %r' % cmd_line)
      self._proc = subprocess.Popen(
          cmd_line, stdout=subprocess.PIPE, stdin=subprocess.PIPE,
          stderr=subprocess.PIPE, bufsize=1)
      atexit_with_log.Register(self.StopServer)
      try:
        util.WaitFor(self._IsStarted, timeout)
      except exceptions.TimeoutException:
        err = self.StopServer()
        raise RuntimeError(
            'Error starting tsproxy: %s' % err)
function_tokens: def StartServer ( self , timeout = 10 ) : cmd_line = [ sys . executable , _TSPROXY_PATH ] cmd_line . extend ( [ '--port=0' , # Use port 0 so tsproxy picks a random available port. '--mapports=4a43:%s,*:%s' % ( self . _https_port , self . _http_port ) ] ) logging . info ( 'Tsproxy commandline: %r' % cmd_line ) self . _proc = subprocess . Popen ( cmd_line , stdout = subprocess . PIPE , stdin = subprocess . PIPE , stderr = subprocess . PIPE , bufsize = 1 ) atexit_with_log . Register ( self . StopServer ) try : util . WaitFor ( self . _IsStarted , timeout ) except exceptions . TimeoutException : err = self . StopServer ( ) raise RuntimeError ( 'Error starting tsproxy: %s' % err )