parameters: ()
return_statement: return version != env_version
docstring: Check if the toolchain should be upgraded.
docstring_summary: Check if the toolchain should be upgraded.
docstring_tokens: Check if the toolchain should be upgraded .
function: def ShouldUpdateToolchain():
    """Check if the toolchain should be upgraded."""
    if not os.path.exists(json_data_file):
      return True
    with open(json_data_file, 'r') as tempf:
      toolchain_data = json.load(tempf)
    version = toolchain_data['version']
    env_version = GetVisualStudioVersion()
    # If there's a mismatch between the version set in the environment and the one
    # in the json file then the toolchain should be updated.
    return version != env_version
function_tokens: def ShouldUpdateToolchain ( ) : if not os . path . exists ( json_data_file ) : return True with open ( json_data_file , 'r' ) as tempf : toolchain_data = json . load ( tempf ) version = toolchain_data [ 'version' ] env_version = GetVisualStudioVersion ( ) # If there's a mismatch between the version set in the environment and the one # in the json file then the toolchain should be updated. return version != env_version