(self)
| 162 | return self.pty_shell |
| 163 | |
| 164 | def close_shell(self) -> None: |
| 165 | try: |
| 166 | sh = getattr(self, "pty_shell", None) |
| 167 | if sh is not None: |
| 168 | sh.close() |
| 169 | except Exception: |
| 170 | pass |
| 171 | finally: |
| 172 | self.pty_shell = None |
| 173 | |
| 174 | def close_sync(self) -> None: |
| 175 | """Close shell and clean up session directory.""" |