parameters: (var_name, is_string=True)
return_statement: return None
docstring: Gets the value of a GN build argument.
docstring_summary: Gets the value of a GN build argument.
docstring_tokens: Gets the value of a GN build argument .
function: def GetGnArg(var_name, is_string=True):
    """Gets the value of a GN build argument."""
    val = subprocess.check_output([FindGn(), '--root=' + ROOT_DIR, 'args',
                                   '.', '--list=' + var_name, '--short'])
    # Examine the output line by line, since it might contain lines that are
    # warnings.
    for line in val.splitlines():
      fmt = r'^%s = "(.*)"$' if is_string else r'^%s = (.*)$'
      match = re.match(fmt % var_name, line)
      if match:
        return match.group(1)
    return None
function_tokens: def GetGnArg ( var_name , is_string = True ) : val = subprocess . check_output ( [ FindGn ( ) , '--root=' + ROOT_DIR , 'args' , '.' , '--list=' + var_name , '--short' ] ) # Examine the output line by line, since it might contain lines that are # warnings. for line in val . splitlines ( ) : fmt = r'^%s = "(.*)"$' if is_string else r'^%s = (.*)$' match = re . match ( fmt % var_name , line ) if match : return match . group ( 1 ) return None