def Flush(self, sync=True):
    if self.locked and self.CheckLease() == 0:
      raise LockError("Can not update lease that has already expired.")

    self._WriteAttributes(sync=sync)
    self._SyncAttributes()

    if self.parent:
      self.parent.Flush(sync=sync)
Syncs this object with the data store, maintaining object validity.
dataset/ETHPy150Open google/grr/grr/lib/aff4.py/AFF4Object.Flush