[Python-checkins] r71186 - in python/branches/py3k/Lib/idlelib: NEWS.txt run.py

kurt.kaiser python-checkins at python.org
Sat Apr 4 22:13:23 CEST 2009


Author: kurt.kaiser
Date: Sat Apr  4 22:13:23 2009
New Revision: 71186

Log:
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.
........


Modified:
   python/branches/py3k/Lib/idlelib/NEWS.txt
   python/branches/py3k/Lib/idlelib/run.py

Modified: python/branches/py3k/Lib/idlelib/NEWS.txt
==============================================================================
--- python/branches/py3k/Lib/idlelib/NEWS.txt	(original)
+++ python/branches/py3k/Lib/idlelib/NEWS.txt	Sat Apr  4 22:13:23 2009
@@ -3,6 +3,9 @@
 
 *Release date: XX-XXX-XXXX*
 
+- Remove port spec from run.py and fix bug where subprocess fails to
+  extract port from command line when warnings are present.
+
 - Issue #4815: Offer conversion to UTF-8 if source files have
   no encoding declaration and are not encoded in UTF-8.
 

Modified: python/branches/py3k/Lib/idlelib/run.py
==============================================================================
--- python/branches/py3k/Lib/idlelib/run.py	(original)
+++ python/branches/py3k/Lib/idlelib/run.py	Sat Apr  4 22:13:23 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