[Twisted-Python] Finding out the IP which it failed to connect

Kevin Horn kevin.horn at gmail.com
Sat Jan 21 14:19:09 EST 2012


On Fri, Jan 20, 2012 at 9:02 PM, Itamar Turner-Trauring <itamar at itamarst.org
> wrote:

> On 01/20/2012 02:23 PM, Facundo Batista wrote:
> > On Fri, Jan 20, 2012 at 4:06 PM, Kevin Horn<kevin.horn at gmail.com>
>  wrote:
> >
> >> twisted.internet.tcp.Connector has a getDestination() method, which
> should
> >> return an address object.
> >>
> >> Have you tried that? (I haven't, but it looks like the right thing)
> > It returns the name used, not the IP.
> >
>
> That seems... wrong. Perhaps enshrined by prior existence, but wrong
> nonetheless - it's an IPv4Address, it should have an IP. Could you file
> a ticket?
>
>
Looking at the api docs for IPv4Address, the 'host' member is described as
"A string containing the dotted-quad IP address."

So if it's giving you the hostname, then this definitely looks like a bug.

Kevin Horn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20120121/e93ed998/attachment.htm 


More information about the Twisted-Python mailing list