plcopen/plcopen.py
changeset 1261 46425f3248b7
parent 1234 9623d591efb9
child 1276 29bfd39e8e7a
--- a/plcopen/plcopen.py	Fri Jun 14 11:07:59 2013 +0200
+++ b/plcopen/plcopen.py	Fri Jun 14 11:45:56 2013 +0200
@@ -1753,6 +1753,13 @@
     cls.currentExecutionOrderId = 0
     cls.instances_dict = {}
     
+    setattr(cls, "_init_", getattr(cls, "__init__"))
+    
+    def __init__(self, *args, **kwargs):
+        self._init_(*args, **kwargs)
+        self.instances_dict = {}
+    setattr(cls, "__init__", __init__)
+    
     setattr(cls, "_loadXMLTree", getattr(cls, "loadXMLTree"))
     
     def loadXMLTree(self, *args, **kwargs):