Fixed bug structures.py crashing with non-connected blocks.
--- a/plcopen/structures.py Fri Jan 16 13:22:07 2009 +0100
+++ b/plcopen/structures.py Mon Jan 19 08:21:41 2009 +0100
@@ -34,8 +34,11 @@
"L" : ["LINT", "ULINT", "LREAL", "LWORD"]}
# Helper for emulate join on element list
-def JoinList(separator, list):
- return reduce(lambda x, y: x + separator + y, list)
+def JoinList(separator, mylist):
+ if len(mylist) > 0 :
+ return reduce(lambda x, y: x + separator + y, mylist)
+ else :
+ return mylist
def generate_block(generator, block, body, link, order=False):
body_type = body.getcontent()["name"]