Mercurial > hg-stable
changeset 7087:62c71741ae7d
zeroconf: use only first part of hostname for building local name
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 12 Oct 2008 15:21:08 -0500 |
parents | 4033195d455b |
children | 58b7b5ef6cd0 |
files | hgext/zeroconf/__init__.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/zeroconf/__init__.py Sun Oct 12 15:21:08 2008 -0500 +++ b/hgext/zeroconf/__init__.py Sun Oct 12 15:21:08 2008 -0500 @@ -49,7 +49,8 @@ ip = getip() localip = socket.inet_aton(ip) - host = socket.gethostname() + ".local" + parts = socket.gethostname().split('.') + host = parts[0] + ".local" # advertise to browsers svc = Zeroconf.ServiceInfo('_http._tcp.local.',