def __exit__(self, exc_type, exc_val, exc_tb):
        """Support for the context manager protocol.

        Close the file and allow exceptions to propagate.
        """
        self.close()

        # propagate exceptions
        return False
Support for the context manager protocol.

        Close the file and allow exceptions to propagate.
        
stackoverflow/venv/lib/python3.6/site-packages/gridfs/grid_file.py