From: Dmitry Selyutin Date: Sun, 20 Nov 2022 13:56:33 +0000 (+0300) Subject: power_fields: avoid unknown attributes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f16d7c6cd24e3a8b096c71e82b73b8de4c76e15e;p=openpower-isa.git power_fields: avoid unknown attributes --- diff --git a/src/openpower/decoder/power_fields.py b/src/openpower/decoder/power_fields.py index 21de9b74..856182f3 100644 --- a/src/openpower/decoder/power_fields.py +++ b/src/openpower/decoder/power_fields.py @@ -301,6 +301,9 @@ class Mapping(Reference, metaclass=MappingMeta): return self.assign(value=value, bits=key) + def __getattr__(self, key): + raise AttributeError(key) + @classmethod def traverse(cls, path): for (name, member) in cls.__members__.items():