From ed55fea1437a9d7a6f3f9b650d543369f4b7d592 Mon Sep 17 00:00:00 2001 From: guido Date: Thu, 25 Jan 2007 11:25:40 +0100 Subject: [PATCH] [svn r37318] Rolling back previous change, instead applying what seems to have been the intention from the start: if '' is supplied as hostname from the server, use the IP address as reported by socket.getsockname() --HG-- branch : trunk --- py/execnet/register.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/py/execnet/register.py b/py/execnet/register.py index 7ac895c70..b90f770a1 100644 --- a/py/execnet/register.py +++ b/py/execnet/register.py @@ -145,9 +145,7 @@ class SocketGateway(InstallableGateway): given gateway. """ if hostport is None: - # XXX not sure about this one... is this what's intended? it used - # to use '' for the hostname, which breaks Windows... - host, port = ('127.0.0.1', 0) + host, port = ('', 0) else: host, port = hostport socketserverbootstrap = py.code.Source( @@ -163,12 +161,10 @@ class SocketGateway(InstallableGateway): channel = gateway.remote_exec(socketserverbootstrap) hostname, (realhost, realport) = channel.receive() if not hostname: - # XXX this is strange... shouldn't it be 'realhost = hostname' or - # something? hostname = realhost #gateway._trace("remote_install received" # "port=%r, hostname = %r" %(realport, hostname)) - return py.execnet.SocketGateway(realhost, realport) + return py.execnet.SocketGateway(hostname, realport) remote_install = classmethod(remote_install) class SshGateway(PopenCmdGateway):