Adding support for Debugging in PLCOpenEditor
authorlbessard
Sun, 07 Sep 2008 15:23:32 +0200
changeset 246 3613c6ee9e0e
parent 245 60a221d72152
child 247 655d5fef0204
Adding support for Debugging in PLCOpenEditor
plugger.py
--- a/plugger.py	Sun Sep 07 10:06:19 2008 +0200
+++ b/plugger.py	Sun Sep 07 15:23:32 2008 +0200
@@ -1330,6 +1330,9 @@
         to a WeakKeyDictionary linking 
         weakly referenced callables to optionnal args
         """
+        if self._IECPathToIdx.get(IECPath, None) is None:
+            return None
+        
         self.IECdebug_lock.acquire()
         # If no entry exist, create a new one with a fresh WeakKeyDictionary
         IECdebug_data = self.IECdebug_datas.get(IECPath, None)
@@ -1543,6 +1546,7 @@
             data = builder.GetBinaryCode()
             if data is not None :
                 if self._connector.NewPLC(MD5, data, extrafiles):
+                    self.ProgramTransferred()
                     self.logger.write("Transfer completed successfully.\n")
                 else:
                     self.logger.write_error("Transfer failed\n")