summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib
diff options
context:
space:
mode:
authorKurt B. Kaiser <kbk@shore.net>2009-04-02 02:44:54 (GMT)
committerKurt B. Kaiser <kbk@shore.net>2009-04-02 02:44:54 (GMT)
commit4724f40bcb69a4a1f84ba61918c14a8f0082a9ac (patch)
treef14b3e12d5e671b5e88de3adfaaf532868ec7a41 /Lib/idlelib
parentb502bc7a1a1f7038f9fc0fd8cd3c1e65d45ad694 (diff)
downloadcpython-4724f40bcb69a4a1f84ba61918c14a8f0082a9ac.zip
cpython-4724f40bcb69a4a1f84ba61918c14a8f0082a9ac.tar.gz
cpython-4724f40bcb69a4a1f84ba61918c14a8f0082a9ac.tar.bz2
Remove port spec from run.py and fix bug where
subprocess fails to extract port from command line when warnings are present.
Diffstat (limited to 'Lib/idlelib')
-rw-r--r--Lib/idlelib/NEWS.txt5
-rw-r--r--Lib/idlelib/run.py9
2 files changed, 10 insertions, 4 deletions
diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt
index 6f912e8..b3095e6 100644
--- a/Lib/idlelib/NEWS.txt
+++ b/Lib/idlelib/NEWS.txt
@@ -3,8 +3,11 @@ What's New in IDLE 2.7a0?
*Release date: XX-XXX-2009*
+- Remove port spec from run.py and fix bug where subprocess fails to
+ extract port from command line when warnings are present.
+
- Tk 8.5 Text widget requires 'wordprocessor' tabstyle attr to handle
- mixed space/tab properly. Issue 5120, patch by Guilherme Polo.
+ mixed space/tab properly. Issue 5129, patch by Guilherme Polo.
- Issue #3549: On MacOS the preferences menu was not present
diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py
index abe94ab..2d5c5ed 100644
--- a/Lib/idlelib/run.py
+++ b/Lib/idlelib/run.py
@@ -67,10 +67,13 @@ def main(del_exitfunc=False):
global quitting
global no_exitfunc
no_exitfunc = del_exitfunc
- port = 8833
#time.sleep(15) # test subprocess not responding
- if sys.argv[1:]:
- port = int(sys.argv[1])
+ try:
+ assert(len(sys.argv) > 1)
+ port = int(sys.argv[-1])
+ except:
+ print>>sys.stderr, "IDLE Subprocess: no IP port passed in sys.argv."
+ return
sys.argv[:] = [""]
sockthread = threading.Thread(target=manage_socket,
name='SockThread',