parameters: (self, type, gn_args_path, more_gn_args)
return_statement: return True
docstring: Append extra gn arguments to the generated args.gn file.
docstring_summary: Append extra gn arguments to the generated args.gn file.
docstring_tokens: Append extra gn arguments to the generated args . gn file .
function: def _append_gn_args(self, type, gn_args_path, more_gn_args):
      """Append extra gn arguments to the generated args.gn file."""
      if not more_gn_args:
        return False
      self.verbose_print_1('Appending """\n%s\n""" to %s.' % (
          more_gn_args, os.path.abspath(gn_args_path)))
      with open(gn_args_path, 'a') as f:
        f.write('\n# Additional %s args:\n' % type)
        f.write(more_gn_args)
        f.write('\n')
  
      # Artificially increment modification time as our modifications happen too
      # fast. This makes sure that gn is properly rebuilding the ninja files.
      mtime = os.path.getmtime(gn_args_path) + 1
      with open(gn_args_path, 'a'):
        os.utime(gn_args_path, (mtime, mtime))
  
      return True
function_tokens: def _append_gn_args ( self , type , gn_args_path , more_gn_args ) : if not more_gn_args : return False self . verbose_print_1 ( 'Appending """\n%s\n""" to %s.' % ( more_gn_args , os . path . abspath ( gn_args_path ) ) ) with open ( gn_args_path , 'a' ) as f : f . write ( '\n# Additional %s args:\n' % type ) f . write ( more_gn_args ) f . write ( '\n' ) # Artificially increment modification time as our modifications happen too # fast. This makes sure that gn is properly rebuilding the ninja files. mtime = os . path . getmtime ( gn_args_path ) + 1 with open ( gn_args_path , 'a' ) : os . utime ( gn_args_path , ( mtime , mtime ) ) return True