def flush(self):
        """flushes all file contents to disc"""
        for fp in self.files:
            fp.flush()
            if isinstance(fp, int) or hasattr(fp, "fileno"):
                try:
                    os.fsync(fp)
                except OSError:
                    pass
def flush ( self ) : for fp in self . files : fp . flush ( ) if isinstance ( fp , int ) or hasattr ( fp , "fileno" ) : try : os . fsync ( fp ) except OSError : pass
flushes all file contents to disc