From a1370841224ce40ff954eb6a5f7ac020ee9abba9 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