Unwind the exit stack by calling its :meth:`__exit__` providing the exception information to allow for exception handling by the various resources registered using :meth;`with_resource` :return: Whatever ``exit_stack.__exit__()`` returns.
(
self,
exc_type: type[BaseException] | None,
exc_value: BaseException | None,
tb: TracebackType | None,
)
| 690 | self._close_with_exception_info(None, None, None) |
| 691 | |
| 692 | def _close_with_exception_info( |
| 693 | self, |
| 694 | exc_type: type[BaseException] | None, |
| 695 | exc_value: BaseException | None, |
| 696 | tb: TracebackType | None, |
| 697 | ) -> bool | None: |
| 698 | """Unwind the exit stack by calling its :meth:`__exit__` providing the exception |
| 699 | information to allow for exception handling by the various resources registered |
| 700 | using :meth;`with_resource` |
| 701 | |
| 702 | :return: Whatever ``exit_stack.__exit__()`` returns. |
| 703 | """ |
| 704 | exit_result = self._exit_stack.__exit__(exc_type, exc_value, tb) |
| 705 | # In case the context is reused, create a new exit stack. |
| 706 | self._exit_stack = ExitStack() |
| 707 | |
| 708 | return exit_result |
| 709 | |
| 710 | @property |
| 711 | def command_path(self) -> str: |