summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/PyShell.py
diff options
context:
space:
mode:
authorKurt B. Kaiser <kbk@shore.net>2002-08-05 03:52:10 (GMT)
committerKurt B. Kaiser <kbk@shore.net>2002-08-05 03:52:10 (GMT)
commit8dcdb77132563c734c228e815498c47e487f95cf (patch)
tree37388a14ba67dc380e90edbf37d006ec820095a6 /Lib/idlelib/PyShell.py
parent725bb233b9492eb4b5532d84b60db5daa1e6b195 (diff)
downloadcpython-8dcdb77132563c734c228e815498c47e487f95cf.zip
cpython-8dcdb77132563c734c228e815498c47e487f95cf.tar.gz
cpython-8dcdb77132563c734c228e815498c47e487f95cf.tar.bz2
GvR provided solution to the socket rebinding timeout problem.
M PyShell.py M rpc.py M run.py
Diffstat (limited to 'Lib/idlelib/PyShell.py')
-rw-r--r--Lib/idlelib/PyShell.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py
index a0a641b..b483ea8 100644
--- a/Lib/idlelib/PyShell.py
+++ b/Lib/idlelib/PyShell.py
@@ -198,16 +198,14 @@ class ModifiedInterpreter(InteractiveInterpreter):
args = [sys.executable] + w + ["-c", "__import__('run').main()",
str(port)]
self.rpcpid = os.spawnv(os.P_NOWAIT, args[0], args)
- # Idle starts listening for connection on localhost, retry since
- # Idle may be restarted before port is available for rebinding
- # XXX 25 July 2002 KBK Find out what is causing the delayed release!
- for i in range(12):
+ # Idle starts listening for connection on localhost
+ for i in range(6):
time.sleep(i)
try:
self.rpcclt = rpc.RPCClient(addr)
break
except socket.error, err:
- if i < 5:
+ if i < 3:
print>>sys.__stderr__, ". ",
else:
print>>sys.__stderr__,"\nIdle socket error: " + err[1]\