[common] DictModel get does not raise errors as in Python

getr raises an error if the key does not exist
This commit is contained in:
Fabien Castan 2024-06-15 17:10:46 +02:00
parent 09525a364e
commit c986b4a134
4 changed files with 42 additions and 25 deletions

View file

@ -608,7 +608,7 @@ class BaseNode(BaseObject):
assert isinstance(att, ListAttribute)
att = att.value.at(int(idx))
else:
att = self._attributes.get(name)
att = self._attributes.getr(name)
return att
@Slot(str, result=Attribute)