parameters: (name, argv, stamp_file)
return_statement: return True
docstring: Returns True if the command was successfully sent to the build server.
docstring_summary: Returns True if the command was successfully sent to the build server.
docstring_tokens: Returns True if the command was successfully sent to the build server .
function: def MaybeRunCommand(name, argv, stamp_file):
    """Returns True if the command was successfully sent to the build server."""
  
    # When the build server runs a command, it sets this environment variable.
    # This prevents infinite recursion where the script sends a request to the
    # build server, then the build server runs the script, and then the script
    # sends another request to the build server.
    if BUILD_SERVER_ENV_VARIABLE in os.environ:
      return False
    with contextlib.closing(socket.socket(socket.AF_UNIX)) as sock:
      try:
        sock.connect(SOCKET_ADDRESS)
        sock.sendall(
            json.dumps({
                'name': name,
                'cmd': argv,
                'cwd': os.getcwd(),
                'stamp_file': stamp_file,
            }).encode('utf8'))
      except socket.error as e:
        # [Errno 111] Connection refused. Either the server has not been started
        #             or the server is not currently accepting new connections.
        if e.errno == 111:
          return False
        raise e
    return True
function_tokens: def MaybeRunCommand ( name , argv , stamp_file ) : # When the build server runs a command, it sets this environment variable. # This prevents infinite recursion where the script sends a request to the # build server, then the build server runs the script, and then the script # sends another request to the build server. if BUILD_SERVER_ENV_VARIABLE in os . environ : return False with contextlib . closing ( socket . socket ( socket . AF_UNIX ) ) as sock : try : sock . connect ( SOCKET_ADDRESS ) sock . sendall ( json . dumps ( { 'name' : name , 'cmd' : argv , 'cwd' : os . getcwd ( ) , 'stamp_file' : stamp_file , } ) . encode ( 'utf8' ) ) except socket . error as e : # [Errno 111] Connection refused. Either the server has not been started #             or the server is not currently accepting new connections. if e . errno == 111 : return False raise e return True