Closed vitaly-krugl closed 8 years ago
Reverting the IPv6 support commit bbfbb31b2f2a123c0398fb07a2a5100025ba4184 changes the exception to the expected:
>>> Connection(host="www.google.com")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/vkruglikov/ossdev/haigha/haigha/connection.py", line 141, in __init__
self.connect(self._host, self._port)
File "/Users/vkruglikov/ossdev/haigha/haigha/connection.py", line 223, in connect
self._transport.connect((host, port))
File "/Users/vkruglikov/ossdev/haigha/haigha/transports/socket_transport.py", line 39, in connect
self._sock.connect((host, port))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
socket.timeout: timed out
Also, without the IPv6 commit, when rabbitmq is down on localhost, you get a more reasonable traceback:
>>> Connection()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/vkruglikov/ossdev/haigha/haigha/connection.py", line 141, in __init__
self.connect(self._host, self._port)
File "/Users/vkruglikov/ossdev/haigha/haigha/connection.py", line 223, in connect
self._transport.connect((host, port))
File "/Users/vkruglikov/ossdev/haigha/haigha/transports/socket_transport.py", line 39, in connect
self._sock.connect((host, port))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 61] Connection refused
I believe this to be addressed by PR #69
Got the following traceback when executing
Connection(host="www.google.com")
Note: I also get the same error when executing
Connection()
on my MacBookPro while RabbitMQ broker is not running