Method
__exit__
(
self,
exc_type: type[BaseException] | None,
exc_val: BaseException | None,
exc_tb: TracebackType | None,
)
Source from the content-addressed store, hash-verified
| 63 | return self |
| 64 | |
| 65 | def __exit__( |
| 66 | self, |
| 67 | exc_type: type[BaseException] | None, |
| 68 | exc_val: BaseException | None, |
| 69 | exc_tb: TracebackType | None, |
| 70 | ) -> None: |
| 71 | try: |
| 72 | with self._lock: |
| 73 | self._conn.wait(self._exit_gen()) |
| 74 | except Exception as exc2: |
| 75 | # Don't clobber an exception raised in the block with this one |
| 76 | if exc_val: |
| 77 | logger.warning("error ignored terminating %r: %s", self, exc2) |
| 78 | else: |
| 79 | raise exc2.with_traceback(None) |
| 80 | finally: |
| 81 | self._exit(exc_val) |
Callers
nothing calls this directly
Tested by
no test coverage detected