(self, force=False)
| 1002 | return self.captured_output.stderr(encoding) |
| 1003 | |
| 1004 | def disconnect(self, force=False): |
| 1005 | if self.channel is None: |
| 1006 | return |
| 1007 | |
| 1008 | try: |
| 1009 | if not force: |
| 1010 | self.request("disconnect") |
| 1011 | self.wait_for_terminated() |
| 1012 | except messaging.JsonIOError: |
| 1013 | pass |
| 1014 | finally: |
| 1015 | try: |
| 1016 | self.channel.close() |
| 1017 | except Exception: |
| 1018 | pass |
| 1019 | self.channel.wait() |
| 1020 | self.channel = None |
| 1021 | |
| 1022 | |
| 1023 | Session.reset_counter() |