Fix bug when launching Beremiz_service with autostart option and working dir doesn't contain any program
authorLaurent Bessard
Mon, 15 Apr 2013 00:36:41 +0200
changeset 1034 078bf153fb8c
parent 1033 1eec9b855e47
child 1035 0f905e027d18
child 1036 a6718197caf2
Fix bug when launching Beremiz_service with autostart option and working dir doesn't contain any program
Beremiz_service.py
--- a/Beremiz_service.py	Mon Apr 15 00:35:04 2013 +0200
+++ b/Beremiz_service.py	Mon Apr 15 00:36:41 2013 +0200
@@ -487,7 +487,7 @@
             self.servicepublisher = ServicePublisher.ServicePublisher()
             self.servicepublisher.RegisterService(self.servicename, self.ip_addr, self.port)
         
-        if self.autostart:
+        if self.autostart and self.plcobj.GetPLCstatus()[0] != "Empty":
             self.plcobj.LoadPLC()
             self.plcobj.StartPLC()