# HG changeset patch # User laurent # Date 1321634352 -3600 # Node ID b2442bb10c0ba2e04f2a1c24cf101cbedc98bb12 # Parent e3a1d9a59c97474a802664fc5c415a021a27fbb0 Fixing bug when modifying the name of a derived data type diff -r e3a1d9a59c97 -r b2442bb10c0b plcopen/plcopen.py --- a/plcopen/plcopen.py Fri Nov 18 17:37:43 2011 +0100 +++ b/plcopen/plcopen.py Fri Nov 18 17:39:12 2011 +0100 @@ -1117,7 +1117,7 @@ if self.content["name"] in ["derived", "array", "subrangeSigned", "subrangeUnsigned"]: self.content["value"].updateElementName(old_name, new_name) elif self.content["name"] == "struct": - for element in datatype_content["value"].getvariable(): + for element in self.content["value"].getvariable(): element_type = element.type.updateElementName(old_name, new_name) setattr(cls, "updateElementName", updateElementName)