summaryrefslogtreecommitdiff
path: root/Lib/idlelib/run.py
diff options
context:
space:
mode:
authorKurt B. Kaiser <kbk@shore.net>2009-04-04 20:13:23 +0000
committerKurt B. Kaiser <kbk@shore.net>2009-04-04 20:13:23 +0000
commite67842aedc701ae53ffee783b38fcbf56c022296 (patch)
treef9496e18472ba3807ac819fed1c0915b6b9b121b /Lib/idlelib/run.py
parent8d8d6300034864d9975aedfd0560db8b7bace00f (diff)
downloadcpython-git-e67842aedc701ae53ffee783b38fcbf56c022296.tar.gz
Merged revisions 71023 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r71023 | kurt.kaiser | 2009-04-01 22:44:54 -0400 (Wed, 01 Apr 2009) | 3 lines 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/run.py')
-rw-r--r--Lib/idlelib/run.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py
index 28b7bc0bca..6659ee725d 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',