projects
/
openpower-isa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b96539a
)
insndb/core: replace walkability check
author
Dmitry Selyutin
<ghostmansd@gmail.com>
Sat, 10 Jun 2023 17:01:52 +0000
(20:01 +0300)
committer
Dmitry Selyutin
<ghostmansd@gmail.com>
Sat, 10 Jun 2023 18:04:59 +0000
(21:04 +0300)
src/openpower/insndb/core.py
patch
|
blob
|
history
diff --git
a/src/openpower/insndb/core.py
b/src/openpower/insndb/core.py
index 2c7abe79dc36a2f137dc4296e895784c4fbd2343..68fdfe20e8a30eb780ae2761ae41eb99326838fa 100644
(file)
--- a/
src/openpower/insndb/core.py
+++ b/
src/openpower/insndb/core.py
@@
-81,7
+81,7
@@
class DataclassMeta(type):
return _dataclasses.dataclass(cls, eq=True, frozen=True)
-class Dataclass(metaclass=DataclassMeta):
+class Dataclass(
Node,
metaclass=DataclassMeta):
@walkmethod
def walk(clsself, match=None):
if match is None:
@@
-171,7
+171,7
@@
def walk(root, match=None):
def visit(visitor, node):
with visitor(node=node):
- if
hasattr(node, "walk"
):
+ if
isinstance(node, Node
):
for subnode in node.walk():
visit(visitor=visitor, node=subnode)