power_insn: return None for unknown insn names
authorDmitry Selyutin <ghostmansd@gmail.com>
Sun, 6 Nov 2022 09:29:55 +0000 (12:29 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Sun, 15 Jan 2023 19:47:22 +0000 (22:47 +0300)
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