power_fields: avoid unknown attributes
authorDmitry Selyutin <ghostmansd@gmail.com>
Sun, 20 Nov 2022 13:56:33 +0000 (16:56 +0300)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 2 Jun 2023 18:51:16 +0000 (19:51 +0100)
src/openpower/decoder/power_fields.py

index 21de9b74ecd839266550a58e963fefe4b5fd5b7d..856182f36de8e918c92418196d5a129a2869d5ef 100644 (file)
@@ -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():