##// END OF EJS Templates
zeroconf: advertise repositories with hostname
Alexander Solovyov -
r7845:c2cd8d77 default
parent child Browse files
Show More
@@ -77,8 +77,9 b' def publish(name, desc, path, port):'
77 ip = getip()
77 ip = getip()
78 localip = socket.inet_aton(ip)
78 localip = socket.inet_aton(ip)
79
79
80 parts = socket.gethostname().split('.')
80 hostname = socket.gethostname().split('.')[0]
81 host = parts[0] + ".local"
81 host = hostname + ".local"
82 name = "%s-%s" % (hostname, name)
82
83
83 # advertise to browsers
84 # advertise to browsers
84 svc = Zeroconf.ServiceInfo('_http._tcp.local.',
85 svc = Zeroconf.ServiceInfo('_http._tcp.local.',
General Comments 0
You need to be logged in to leave comments. Login now