# HG changeset patch # User laurent # Date 1273520171 -7200 # Node ID cecb4369fa425f198ee2969688f1c1d6f019779e # Parent 5f90349529c9d39d997f4eb1349d08062d853b43 Bug when trying to generate SFC with unconnected connectors fixed diff -r 5f90349529c9 -r cecb4369fa42 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):