mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
#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.
This commit is contained in:
parent
6f7fad16bc
commit
efae8c499f
2 changed files with 7 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue