author | Laurent Bessard |
Wed, 20 Mar 2013 23:47:07 +0100 | |
changeset 990 | 7f57b969caed |
parent 989 | b24c11c93766 |
child 991 | afc4963d8f0c |
--- a/plcopen/plcopen.py Sun Mar 17 19:03:25 2013 +0100 +++ b/plcopen/plcopen.py Wed Mar 20 23:47:07 2013 +0100 @@ -1383,7 +1383,7 @@ setattr(cls, "removepouVar", removepouVar) def hasblock(self, name): - if self.getbodyType() in ["FBD", "LD", "SFC"]: + if name != "" and self.getbodyType() in ["FBD", "LD", "SFC"]: for instance in self.getinstances(): if isinstance(instance, PLCOpenClasses["fbdObjects_block"]) and instance.getinstanceName() == name: return True