tools/flags/generate_unexpire_flags.py
def update_file_if_stale(filename, data):
  """Writes data to filename if data is different from file's contents on disk.
  """
  try:
    disk_data = open(filename, 'r').read()
    if disk_data == data:
      return
  except IOError:
    pass
  open(filename, 'w').write(data)
Writes data to filename if data is different from file's contents on disk.
  
Writes data to filename if data is different from file's contents on disk.
Writes data to filename if data is different from file ' s contents on disk .
def update_file_if_stale(filename, data):
  try:
    disk_data = open(filename, 'r').read()
    if disk_data == data:
      return
  except IOError:
    pass
  open(filename, 'w').write(data)
def update_file_if_stale ( filename , data ) : try : disk_data = open ( filename , 'r' ) . read ( ) if disk_data == data : return except IOError : pass open ( filename , 'w' ) . write ( data )
Writes data to filename if data is different from file's contents on disk.
Writes data to filename if data is different from file ' s contents on disk .
"""Writes data to filename if data is different from file's contents on disk.
  """
filename
data