fix PLC autostart option for Beremiz_service.py
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Thu, 17 Nov 2016 22:57:20 +0300
changeset 1570 0925da818853
parent 1569 06632b380d2a
child 1571 486f94a8032c
fix PLC autostart option for Beremiz_service.py
runtime/PLCObject.py
--- a/runtime/PLCObject.py	Thu Nov 17 22:41:41 2016 +0300
+++ b/runtime/PLCObject.py	Thu Nov 17 22:57:20 2016 +0300
@@ -79,7 +79,8 @@
             self.CurrentPLCFilename=open(
                              self._GetMD5FileName(),
                              "r").read().strip() + lib_ext
-            self.LoadPLC()
+            if self.LoadPLC():
+                self.PLCStatus = "Stopped"
         except Exception, e:
             self.PLCStatus = "Empty"
             self.CurrentPLCFilename=None