# HG changeset patch # User laurent # Date 1303401166 -7200 # Node ID 8dbb1de154c15e093da8a9dd933da558cb3ce70e # Parent 8c7605bbf6730a91982ac24216061391dac66a30 Fix bug when compiling pou including user-defined blocks with unconnected input diff -r 8c7605bbf673 -r 8dbb1de154c1 plcopen/plcopen.py --- 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: