power_enum: tune SVPtype representation
authorDmitry Selyutin <ghostmansd@gmail.com>
Mon, 5 Sep 2022 18:36:24 +0000 (21:36 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Tue, 6 Sep 2022 11:44:56 +0000 (14:44 +0300)
src/openpower/decoder/power_enums.py

index 4a8add835994bcafad9e864d81f87bfaa6c1c71b..daadc555e4a3e39b7f58fb66b88e55509aca909c 100644 (file)
@@ -192,6 +192,13 @@ class SVPtype(Enum):
     def _missing_(cls, value):
         return {"1P": SVPtype.P1, "2P": SVPtype.P2}[value]
 
+    def __repr__(self):
+        return {
+            SVPtype.NONE: "NONE",
+            SVPtype.P1: "1P",
+            SVPtype.P2: "2P",
+        }[self]
+
 
 @unique
 class SVEtype(Enum):