Skip to content

Commit

Permalink
Merge pull request sifive#40 from sifive/fix-nodereference-parent
Browse files Browse the repository at this point in the history
Make sure new children are reparented when merging
  • Loading branch information
nategraff-sifive authored Jan 13, 2020
2 parents eaa1d57 + 38f2335 commit ecdef2e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pydevicetree/ast/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ def merge_tree(self):
self.children = new_children

for n in self.children:
n.parent = self
n.merge_tree()

def merge(self, other: 'Node'):
Expand Down

0 comments on commit ecdef2e

Please sign in to comment.