Fixed bug when transferring New PLC to a non-empty pyro connector
authorLaurent Bessard
Thu, 28 Mar 2013 00:08:55 +0100
changeset 1011 388777d307de
parent 1010 44c3cafef436
child 1012 deb0fcab0c64
Fixed bug when transferring New PLC to a non-empty pyro connector
runtime/PLCObject.py
--- a/runtime/PLCObject.py	Thu Mar 28 00:03:44 2013 +0100
+++ b/runtime/PLCObject.py	Thu Mar 28 00:08:55 2013 +0100
@@ -343,12 +343,12 @@
         return self.PLCStatus, map(self.GetLogCount,xrange(LogLevelsCount))
     
     def NewPLC(self, md5sum, data, extrafiles):
-        self.LogMessage("NewPLC (%s)"%md5sum)
         if self.PLCStatus in ["Stopped", "Empty", "Broken"]:
             NewFileName = md5sum + lib_ext
             extra_files_log = os.path.join(self.workingdir,"extra_files.txt")
 
             self._FreePLC()
+            self.LogMessage("NewPLC (%s)"%md5sum)
             self.PLCStatus = "Empty"
 
             try: