power_insn: return None for unknown insn names
authorDmitry Selyutin <ghostmansd@gmail.com>
Sun, 6 Nov 2022 09:29:55 +0000 (12:29 +0300)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 2 Jun 2023 18:51:16 +0000 (19:51 +0100)
src/openpower/decoder/power_insn.py

index 08db95298b174f0e2cca32e2a537af096336f71e..5d5be5d7cf22559b77c4fb6594c0d40f816e47f7 100644 (file)
@@ -2423,6 +2423,6 @@ class Database:
                    return record
         # hunt by string instead
         elif isinstance(key, str):
-            return self.__names[key]
+            return self.__names.get(key)
 
         return None