|
|
@ -28,13 +28,13 @@ class Publisher:
|
|
|
|
return []
|
|
|
|
return []
|
|
|
|
|
|
|
|
|
|
|
|
def run(self):
|
|
|
|
def run(self):
|
|
|
|
|
|
|
|
|
|
|
|
self.localhostname = split(socket.gethostname(),'.')[0]+'.local.'
|
|
|
|
self.localhostname = split(socket.gethostname(),'.')[0]+'.local.'
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
self.localip = socket.gethostbyname(self.localhostname)
|
|
|
|
self.localip = socket.gethostbyname(self.localhostname)
|
|
|
|
self.zeroconf = Zeroconf.Zeroconf(self.localip)
|
|
|
|
self.zeroconf = Zeroconf.Zeroconf(self.localip)
|
|
|
|
except:
|
|
|
|
except:
|
|
|
|
return
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
self.active = True
|
|
|
|
self.active = True
|
|
|
|
|
|
|
|
|
|
|
|
toRegister = self.services()
|
|
|
|
toRegister = self.services()
|
|
|
@ -52,5 +52,3 @@ class Publisher:
|
|
|
|
|
|
|
|
|
|
|
|
def shutdown(self):
|
|
|
|
def shutdown(self):
|
|
|
|
if self.active: self.zeroconf.close()
|
|
|
|
if self.active: self.zeroconf.close()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|