diff options
author | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2008-11-21 23:08:09 (GMT) |
---|---|---|
committer | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2008-11-21 23:08:09 (GMT) |
commit | efae8c499f522547b9e73afde8821b0a1b1bf015 (patch) | |
tree | e71434d002b9a65034c3ee74cad28e561b11c237 /Lib/idlelib | |
parent | 6f7fad16bc2799c3db0e96d4c4ad35676d59251c (diff) | |
download | cpython-efae8c499f522547b9e73afde8821b0a1b1bf015.zip cpython-efae8c499f522547b9e73afde8821b0a1b1bf015.tar.gz cpython-efae8c499f522547b9e73afde8821b0a1b1bf015.tar.bz2 |
#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.
Diffstat (limited to 'Lib/idlelib')
-rw-r--r-- | Lib/idlelib/run.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py index 806456a..20770b6 100644 --- a/Lib/idlelib/run.py +++ b/Lib/idlelib/run.py @@ -119,10 +119,11 @@ def manage_socket(address): 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 |