Skip to content

Commit d4ec064

Browse files
bizfscacolomb
andauthored
Update canopen/objectdictionary/__init__.py
From review, direct access to the template, we know this attribute exists. Co-authored-by: André Colomb <github.com@andre.colomb.de>
1 parent 174ef08 commit d4ec064

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

canopen/objectdictionary/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ def __getitem__(self, subindex: Union[int, str]) -> ODVariable:
298298
"bit_definitions", "storage_location"):
299299
if attr in template.__dict__:
300300
var.__dict__[attr] = template.__dict__[attr]
301-
var.custom_options = getattr(template, "custom_options", {})
301+
var.custom_options = template.custom_options
302302
else:
303303
raise KeyError(f"Could not find subindex {pretty_index(None, subindex)}")
304304
return var

0 commit comments

Comments
 (0)