[Python-checkins] r71023 - in python/trunk/Lib/idlelib: NEWS.txt run.py

kurt.kaiser python-checkins at python.org
Thu Apr 2 04:44:55 CEST 2009


Author: kurt.kaiser
Date: Thu Apr 2 04:44:54 2009
New Revision: 71023
Log:
Remove port spec from run.py and fix bug where
subprocess fails to extract port from command line
when warnings are present.
Modified:
 python/trunk/Lib/idlelib/NEWS.txt
 python/trunk/Lib/idlelib/run.py
Modified: python/trunk/Lib/idlelib/NEWS.txt
==============================================================================
--- python/trunk/Lib/idlelib/NEWS.txt	(original)
+++ python/trunk/Lib/idlelib/NEWS.txt	Thu Apr 2 04:44:54 2009
@@ -3,8 +3,11 @@
 
 *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
 
Modified: python/trunk/Lib/idlelib/run.py
==============================================================================
--- python/trunk/Lib/idlelib/run.py	(original)
+++ python/trunk/Lib/idlelib/run.py	Thu Apr 2 04:44:54 2009
@@ -67,10 +67,13 @@
 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',


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /