Skip to content

Commit

Permalink
fix bug at merge coverage script
Browse files Browse the repository at this point in the history
  • Loading branch information
M0stafaRady committed Dec 3, 2023
1 parent 50d98ef commit 99da92b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cocotb/caravel_cocotb/scripts/merge_coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ def merge_fun_cov(path, reports_path=None):
tree = {}
for key in yaml_file_object:
level = key.count(".")
nodes = key.split(".")
key_parent = key.replace(f".{nodes[level]}", "")
last_node_index = key.rfind(".")
key_parent = key[:last_node_index] if last_node_index != -1 else key
if level == 0:
root = key
tree[key] = Node(key=key)
Expand Down

0 comments on commit 99da92b

Please sign in to comment.