Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Socket exception uses variable before it is declared #47

Open
GoogleCodeExporter opened this issue Nov 2, 2015 · 4 comments
Open

Socket exception uses variable before it is declared #47

GoogleCodeExporter opened this issue Nov 2, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

I am using v1.0.2 (most recent as of now) on Python 3.2 with the most recent 
RabbitMQ. When there is a network issue it sometimes crashes on connect 
(amqp.Connection()) with this trace:

\connection.py", line 129, in __init__
    self.transport = create_transport(host, connect_timeout, ssl)
\transport.py", line 297, in create_transport
    return TCPTransport(host, connect_timeout)
\transport.py", line 87, in __init__
    raise socket.error(msg)
UnboundLocalError: local variable 'msg' referenced before assignment

I replaced the offending line
raise socket.error(msg)
with:
raise socket.error('Unable to connect')

Original issue reported on code.google.com by [email protected] on 7 Feb 2012 at 9:34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant