[New-bugs-announce] [issue4383] UnboundLocalError when IDLE cannot connect to its subprocess

Amaury Forgeot d'Arc report at bugs.python.org
Fri Nov 21 23:42:48 CET 2008


New submission from Amaury Forgeot d'Arc <amauryfa at gmail.com>:

When IDLE cannot connect to its subprocess, it tries to display the 
socket.error. But since python 3.0 the exception variable is cleared 
after the "except:" block and unavailable for the displaying code.

Exception in thread SockThread:
Traceback (most recent call last):
  File "c:\dev\python\py3k\lib\threading.py", line 507, in 
_bootstrap_inner
    self.run()
  File "c:\dev\python\py3k\lib\threading.py", line 462, in run
    self._target(*self._args, **self._kwargs)
  File "c:\dev\python\py3k\lib\idlelib\run.py", line 125, in 
manage_socket
    show_socket_error(err, address)
UnboundLocalError: local variable 'err' referenced before assignment

Patch is attached.

----------
components: IDLE
files: idle_socketerror.patch
keywords: needs review, patch
messages: 76213
nosy: amaury.forgeotdarc
priority: release blocker
severity: normal
status: open
title: UnboundLocalError when IDLE cannot connect to its subprocess
versions: Python 3.0
Added file: http://bugs.python.org/file12103/idle_socketerror.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4383>
_______________________________________


More information about the New-bugs-announce mailing list