parameters: (force=False)
return_statement: return 0
docstring: Requests an update of the toolchain to the specific hashes we have at
    this revision. The update outputs a .json of the various configuration
    information required to pass to gyp which we use in |GetToolchainDir()|.
docstring_summary: Requests an update of the toolchain to the specific hashes we have at
    this revision. The update outputs a .json of the various configuration
    information required to pass to gyp which we use in |GetToolchainDir()|.
docstring_tokens: Requests an update of the toolchain to the specific hashes we have at this revision . The update outputs a . json of the various configuration information required to pass to gyp which we use in |GetToolchainDir () | .
function: def Update(force=False):
    """Requests an update of the toolchain to the specific hashes we have at
    this revision. The update outputs a .json of the various configuration
    information required to pass to gyp which we use in |GetToolchainDir()|.
    """
    if force != False and force != '--force':
      print >>sys.stderr, 'Unknown parameter "%s"' % force
      return 1
    if force == '--force' or os.path.exists(json_data_file):
      force = True
  
    depot_tools_win_toolchain = \
        bool(int(os.environ.get('DEPOT_TOOLS_WIN_TOOLCHAIN', '1')))
    if ((sys.platform in ('win32', 'cygwin') or force) and
          depot_tools_win_toolchain):
      import find_depot_tools
      depot_tools_path = find_depot_tools.add_depot_tools_to_path()
      get_toolchain_args = [
          sys.executable,
          os.path.join(depot_tools_path,
                      'win_toolchain',
                      'get_toolchain_if_necessary.py'),
          '--output-json', json_data_file,
        ] + _GetDesiredVsToolchainHashes()
      if force:
        get_toolchain_args.append('--force')
      subprocess.check_call(get_toolchain_args)
  
    return 0
function_tokens: def Update ( force = False ) : if force != False and force != '--force' : print >> sys . stderr , 'Unknown parameter "%s"' % force return 1 if force == '--force' or os . path . exists ( json_data_file ) : force = True depot_tools_win_toolchain = bool ( int ( os . environ . get ( 'DEPOT_TOOLS_WIN_TOOLCHAIN' , '1' ) ) ) if ( ( sys . platform in ( 'win32' , 'cygwin' ) or force ) and depot_tools_win_toolchain ) : import find_depot_tools depot_tools_path = find_depot_tools . add_depot_tools_to_path ( ) get_toolchain_args = [ sys . executable , os . path . join ( depot_tools_path , 'win_toolchain' , 'get_toolchain_if_necessary.py' ) , '--output-json' , json_data_file , ] + _GetDesiredVsToolchainHashes ( ) if force : get_toolchain_args . append ( '--force' ) subprocess . check_call ( get_toolchain_args ) return 0