temporary hack-revert, the original is now in branch "paths"
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 11 Jun 2023 12:26:20 +0000 (13:26 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 11 Jun 2023 12:26:20 +0000 (13:26 +0100)
Revert "reduce down one more line in walkmethod.__get__"

This reverts commit f6efd96b89fe55292dd5470ec35dd5263e4d3803.

src/openpower/insndb/core.py

index 973aac002776707372988360ff8dee3dcbea501c..d19f92a5622059b42710dd16089542d25855db20 100644 (file)
@@ -63,7 +63,9 @@ class walkmethod:
         return super().__init__()
 
     def __get__(self, instance, owner):
-        entity = owner if instance is None else instance
+        entity = instance
+        if instance is None:
+            entity = owner
         return _functools.partial(self.__walk, entity)