plcopen/plcopen.py
changeset 1763 bcc07ff2362c
parent 1762 fcc406143e5b
child 1765 ccf59c1f0b45
--- a/plcopen/plcopen.py	Thu Aug 17 11:39:10 2017 +0300
+++ b/plcopen/plcopen.py	Thu Aug 17 14:27:06 2017 +0300
@@ -1682,7 +1682,7 @@
                 for variable in instance.inputVariables.getvariable():
                     connections = variable.connectionPointIn.getconnections()
                     if connections and len(connections) == 1:
-                        if not self.checkedBlocksDict.has_key(connections[0].getrefLocalId()):
+                        if not connections[0].getrefLocalId() in self.checkedBlocksDict:
                             self.compileelementExecutionOrder(connections[0])
                 if instance.getexecutionOrderId() == 0:
                     instance.setexecutionOrderId(self.getnewExecutionOrderId())
@@ -1866,8 +1866,8 @@
     if in_connections is not None:
         for connection in in_connections:
             connected = connection.getrefLocalId()
-            if not connections.has_key((localId, connected)) and \
-               not connections.has_key((connected, localId)):
+            if not (localId, connected) in connections and \
+               not (connected, localId) in connections:
                 connectionPointIn.remove(connection)