adt.py: raise AttributeError in ADTNode._getattr__()

Signed-off-by: Janne Grunau <j@jannau.net>
This commit is contained in:
Janne Grunau 2021-05-16 09:35:18 +02:00 committed by Hector Martin
parent 2aa41192ed
commit 07314994ed

View file

@ -184,7 +184,9 @@ class ADTNode:
def __getattr__(self, attr):
attr = attr.replace("_", "-")
return self._properties[attr]
if attr in self._properties:
return self._properties[attr]
raise AttributeError(attr)
def __setattr__(self, attr, value):
if attr[0] == "_":