components/exo/wayland/fuzzer/wayland_templater.py
def WriteIfChanged(contents, filename):
  """Writes contents to filename.

  If filename already has the right contents, nothing is written so that
  the mtime on filename doesn't change.
  """
  if os.path.exists(filename):
    with open(filename, 'r') as in_fi:
      if in_fi.read() == contents:
        return
  with open(filename, 'w') as out_fi:
    out_fi.write(contents)
Writes contents to filename.

  If filename already has the right contents, nothing is written so that
  the mtime on filename doesn't change.
  
Writes contents to filename.
If filename already has the right contents, nothing is written so that
the mtime on filename doesn't change.
Writes contents to filename . If filename already has the right contents nothing is written so that the mtime on filename doesn ' t change .
def WriteIfChanged(contents, filename):
  if os.path.exists(filename):
    with open(filename, 'r') as in_fi:
      if in_fi.read() == contents:
        return
  with open(filename, 'w') as out_fi:
    out_fi.write(contents)
def WriteIfChanged ( contents , filename ) : if os . path . exists ( filename ) : with open ( filename , 'r' ) as in_fi : if in_fi . read ( ) == contents : return with open ( filename , 'w' ) as out_fi : out_fi . write ( contents )
Writes contents to filename.
Writes contents to filename .
"""Writes contents to filename.

  If filename already has the right contents, nothing is written so that
  the mtime on filename doesn't change.
  """
contents
filename