Bug when trying to generate SFC with unconnected connectors fixed
authorlaurent
Mon, 10 May 2010 21:36:11 +0200
changeset 499 cecb4369fa42
parent 498 5f90349529c9
child 500 b3499ff87178
Bug when trying to generate SFC with unconnected connectors fixed
PLCGenerator.py
--- a/PLCGenerator.py	Wed Dec 16 15:12:59 2009 +0100
+++ b/PLCGenerator.py	Mon May 10 21:36:11 2010 +0200
@@ -990,7 +990,7 @@
         instances = []
         for connectionPointIn in convergence.getconnectionPointIn():
             connections = connectionPointIn.getconnections()
-            if len(connections) == 1:
+            if connections is not None and len(connections) == 1:
                 instanceLocalId = connections[0].getrefLocalId()
                 body = pou.getbody()
                 if isinstance(body, ListType):
@@ -1010,7 +1010,7 @@
             if step.connectionPointIn:
                 instances = []
                 connections = step.connectionPointIn.getconnections()
-                if len(connections) == 1:
+                if connections is not None and len(connections) == 1:
                     instanceLocalId = connections[0].getrefLocalId()
                     body = pou.getbody()
                     if isinstance(body, ListType):
@@ -1039,7 +1039,7 @@
         if jump.connectionPointIn:
             instances = []
             connections = jump.connectionPointIn.getconnections()
-            if len(connections) == 1:
+            if connections is not None and len(connections) == 1:
                 instanceLocalId = connections[0].getrefLocalId()
                 body = pou.getbody()
                 if isinstance(body, ListType):