equal
deleted
inserted
replaced
43 if location.find(service_type) != -1: |
43 if location.find(service_type) != -1: |
44 try : |
44 try : |
45 from util.Zeroconf import Zeroconf |
45 from util.Zeroconf import Zeroconf |
46 r = Zeroconf() |
46 r = Zeroconf() |
47 i=r.getServiceInfo(service_type, location) |
47 i=r.getServiceInfo(service_type, location) |
|
48 if i is None : raise Exception, "'%s' not found"%location |
48 ip = str(socket.inet_ntoa(i.getAddress())) |
49 ip = str(socket.inet_ntoa(i.getAddress())) |
49 port = str(i.getPort()) |
50 port = str(i.getPort()) |
50 newlocation = ip+':'+port |
51 newlocation = ip+':'+port |
51 confnodesroot.logger.write(_("'%s' is located at %s\n")%(location, newlocation)) |
52 confnodesroot.logger.write(_("'%s' is located at %s\n")%(location, newlocation)) |
52 location = newlocation |
53 location = newlocation |