fix SelectableMSB0Fraction's constructor
authorJacob Lifshay <programmerjake@gmail.com>
Fri, 12 May 2023 06:31:02 +0000 (23:31 -0700)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 2 Jun 2023 18:51:18 +0000 (19:51 +0100)
src/openpower/decoder/fp_working_format.py

index e31760415756aa44c1709486948a3a114142ea19..b1fdf56c9d9a0c1275b235b373dde4d39b49d0fd 100644 (file)
@@ -121,7 +121,8 @@ class SelectableMSB0Fraction:
 
     def __init__(self, value=None):
         self.__value = Fraction()
-        self.eq(value)
+        if value is not None:
+            self.eq(value)
 
     @property
     def value(self):