out.flush() os.fsync(out.fileno()) os.replace(temporary, self.path) self.data = validated