summaryrefslogtreecommitdiff
path: root/Lib/idlelib
diff options
context:
space:
mode:
authorNed Deily <nad@acm.org>2011-11-05 22:36:44 -0700
committerNed Deily <nad@acm.org>2011-11-05 22:36:44 -0700
commit22d22bf27685c406155ba557fc8040eba3960ea1 (patch)
tree7056b0d1be175a369777b6f73222f6448fbafd86 /Lib/idlelib
parent553aa27e61eab4e91b4508ffbfadaff4687ca5e1 (diff)
downloadcpython-22d22bf27685c406155ba557fc8040eba3960ea1.tar.gz
Issue #13300: Fix IDLE Restart Shell command failure introduced by
3a5a0943b201. Do not close listening socket on subprocess restart.
Diffstat (limited to 'Lib/idlelib')
-rw-r--r--Lib/idlelib/PyShell.py4
-rw-r--r--Lib/idlelib/rpc.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py
index 33deb457a4..ea3a5d9a8e 100644
--- a/Lib/idlelib/PyShell.py
+++ b/Lib/idlelib/PyShell.py
@@ -460,6 +460,10 @@ class ModifiedInterpreter(InteractiveInterpreter):
def kill_subprocess(self):
try:
+ self.rpcclt.listening_sock.close()
+ except AttributeError: # no socket
+ pass
+ try:
self.rpcclt.close()
except AttributeError: # no socket
pass
diff --git a/Lib/idlelib/rpc.py b/Lib/idlelib/rpc.py
index ddb36bde44..def43945ae 100644
--- a/Lib/idlelib/rpc.py
+++ b/Lib/idlelib/rpc.py
@@ -534,10 +534,6 @@ class RPCClient(SocketIO):
def get_remote_proxy(self, oid):
return RPCProxy(self, oid)
- def close(self):
- self.listening_sock.close()
- SocketIO.close(self)
-
class RPCProxy(object):
__methods = None