Fix bug when compiling pou including user-defined blocks with unconnected input
--- a/plcopen/plcopen.py Thu Apr 21 16:37:43 2011 +0200
+++ b/plcopen/plcopen.py Thu Apr 21 17:52:46 2011 +0200
@@ -606,7 +606,7 @@
# Function that returns the block definition associated to the block type given
def GetCustomBlockType(self, type, inputs = None):
for customblocktype in self.CustomBlockTypes:
- if inputs:
+ if inputs is not None and inputs != "undefined":
customblock_inputs = tuple([var_type for name, var_type, modifier in customblocktype["inputs"]])
same_inputs = inputs == customblock_inputs
else: