MCPcopy Create free account
hub / github.com/mongodb/mongo-python-driver / __exit__

Method __exit__

gridfs/synchronous/grid_file.py:1781–1786  ·  view source on GitHub ↗

Makes it possible to use :class:`GridOut` files with the async context manager protocol.

(self, exc_type: Any, exc_val: Any, exc_tb: Any)

Source from the content-addressed store, hash-verified

1779 return self
1780
1781 def __exit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> Any:
1782 """Makes it possible to use :class:`GridOut` files
1783 with the async context manager protocol.
1784 """
1785 self.close()
1786 return False
1787
1788 def fileno(self) -> NoReturn:
1789 raise io.UnsupportedOperation("fileno")

Callers

nothing calls this directly

Calls 1

closeMethod · 0.95

Tested by

no test coverage detected