diff -r fdd05081c966 -r 9cf9694e8d66 plcopen/plcopen.py --- a/plcopen/plcopen.py Sun Aug 31 18:41:07 2008 +0200 +++ b/plcopen/plcopen.py Mon Sep 01 16:29:50 2008 +0200 @@ -508,12 +508,14 @@ # Return Function Block types checking for recursion def GetCustomFunctionBlockTypes(self, exclude = ""): - pou = self.getpou(exclude) - type = pou.getpouType() + type = None + if exclude != "": + pou = self.getpou(exclude) + type = pou.getpouType() customblocktypes = [] for customblocktype in self.CustomBlockTypes: if customblocktype["name"] != exclude and not self.ElementIsUsedBy(exclude, customblocktype["name"]) and not (type == "function" and customblocktype["type"] != "function"): - customblocktypes.appendcustom(customblocktype["name"]) + customblocktypes.append(customblocktype["name"]) return customblocktypes setattr(cls, "GetCustomFunctionBlockTypes", GetCustomFunctionBlockTypes)