(self)
| 2983 | self.detach() |
| 2984 | |
| 2985 | def detach(self): |
| 2986 | # Detach the debugger and close the socket without raising BdbQuit |
| 2987 | self.quitting = False |
| 2988 | if self._owns_sockfile: |
| 2989 | # Don't try to reuse this instance, it's not valid anymore. |
| 2990 | Pdb._last_pdb_instance = None |
| 2991 | try: |
| 2992 | self._sockfile.close() |
| 2993 | except OSError: |
| 2994 | # close() can fail if the connection was broken unexpectedly. |
| 2995 | pass |
| 2996 | |
| 2997 | def do_debug(self, arg): |
| 2998 | # Clear our cached list of valid commands; the recursive debugger might |