plcopen/plcopen.py
changeset 539 8dbb1de154c1
parent 491 d22a4a95fd5e
child 550 cfa295862d55
--- 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: