[Python-3000-checkins] r67323 - in python/branches/py3k: Lib/idlelib/run.py Misc/NEWS

amaury.forgeotdarc python-3000-checkins at python.org
Sat Nov 22 00:08:10 CET 2008


Author: amaury.forgeotdarc
Date: Sat Nov 22 00:08:09 2008
New Revision: 67323

Log:
#4383: UnboundLocalError when IDLE cannot connect to its subprocess.

Python 3.0 clears the exception variable upon exit of the "except:" clause,
and the displaying code fails miserably.

Reviewed by Benjamin.


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

Modified: python/branches/py3k/Lib/idlelib/run.py
==============================================================================
--- python/branches/py3k/Lib/idlelib/run.py	(original)
+++ python/branches/py3k/Lib/idlelib/run.py	Sat Nov 22 00:08:09 2008
@@ -119,10 +119,11 @@
         except socket.error as err:
             print("IDLE Subprocess: socket error: " + err.args[1] +
                   ", retrying....", file=sys.__stderr__)
+            socket_error = err
     else:
-        print("IDLE Subprocess: Connection to "\
-                               "IDLE GUI failed, exiting.", file=sys.__stderr__)
-        show_socket_error(err, address)
+        print("IDLE Subprocess: Connection to "
+              "IDLE GUI failed, exiting.", file=sys.__stderr__)
+        show_socket_error(socket_error, address)
         global exit_now
         exit_now = True
         return

Modified: python/branches/py3k/Misc/NEWS
==============================================================================
--- python/branches/py3k/Misc/NEWS	(original)
+++ python/branches/py3k/Misc/NEWS	Sat Nov 22 00:08:09 2008
@@ -15,6 +15,9 @@
 Library
 -------
 
+- Issue #4383: When IDLE cannot make the connection to its subprocess, it would
+  fail to properly display the error message.
+
 
 What's New in Python 3.0 release candidate 3?
 =============================================


More information about the Python-3000-checkins mailing list