MCPcopy Create free account
hub / github.com/alibaba/GraphScope / __exit__

Method __exit__

python/graphscope/client/session.py:793–801  ·  view source on GitHub ↗

Unregister self from the default session, close the session and release the resources, ignore all exceptions in close().

(self, exc_type, exc_value, exc_tb)

Source from the content-addressed store, hash-verified

791 return self
792
793 def __exit__(self, exc_type, exc_value, exc_tb):
794 """Unregister self from the default session,
795 close the session and release the resources, ignore all exceptions in close().
796 """
797 try:
798 self._unregister_default()
799 self.close()
800 except Exception:
801 pass
802
803 def as_default(self):
804 """Obtain a context manager that make this object as default session.

Callers 1

_unregister_defaultMethod · 0.45

Calls 2

_unregister_defaultMethod · 0.95
closeMethod · 0.95

Tested by

no test coverage detected