From f16d7c6cd24e3a8b096c71e82b73b8de4c76e15e Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Sun, 20 Nov 2022 16:56:33 +0300 Subject: [PATCH] power_fields: avoid unknown attributes --- src/openpower/decoder/power_fields.py | 3 +++ 1 file changed, 3 insertions(+) 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(): -- 2.30.2