From de12a98ac2724614546f54a6e09b595173bfc587 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Mon, 5 Sep 2022 21:36:24 +0300 Subject: [PATCH] power_enum: tune SVPtype representation --- src/openpower/decoder/power_enums.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/openpower/decoder/power_enums.py b/src/openpower/decoder/power_enums.py index 4a8add83..daadc555 100644 --- a/src/openpower/decoder/power_enums.py +++ b/src/openpower/decoder/power_enums.py @@ -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): -- 2.30.2