--- a/Beremiz_service.py Fri Oct 24 14:01:36 2008 +0200
+++ b/Beremiz_service.py Fri Oct 24 14:36:52 2008 +0200
@@ -177,7 +177,7 @@
- self.servicepublisher = ServicePublisher.ServicePublisher()
+ self.servicepublisher = None @@ -203,7 +203,8 @@
# Configure and publish service
# Not publish service if localhost in address params
if self.ip != "localhost" and self.ip != "127.0.0.1":
- print "Publish service on local network"
+ print "Publish service on local network" + self.servicepublisher = ServicePublisher.ServicePublisher() self.servicepublisher.RegisterService(self.name, self.ip, self.port)
@@ -211,7 +212,9 @@
self.daemon.requestLoop()
- self.servicepublisher.UnRegisterService()
+ if self.servicepublisher is not None: + self.servicepublisher.UnRegisterService() + del self.servicepublisher self.daemon.shutdown(True)
class ParamsEntryDialog(wx.TextEntryDialog):
@@ -335,6 +338,7 @@
def OnTaskBarQuit(self,evt):
+ wx.GetApp().ExitMainLoop() pyroserver = Server(name, ip, port, WorkingDir, args)