Skip to content

Commit

Permalink
Update tool.py
Browse files Browse the repository at this point in the history
  • Loading branch information
gg4924 committed May 2, 2023
1 parent 7c51562 commit f4790a4
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,17 @@ def replaceStr(nodelist,keywords):
return nodelist


def proDuplicateNodeName(nodelist):
def proDuplicateNodeName(nodes):
names = []
for node in nodelist:
index = 0
s = node['tag']
while node['tag'] in names:
node['tag'] = s+str(index)
index += 1
names.append(node['tag'])
return nodelist
for key in nodes.keys():
nodelist = nodes[key]
for node in nodelist:
index = 0
s = node['tag']
while node['tag'] in names:
node['tag'] = s+str(index)
index += 1
names.append(node['tag'])


def removeNodes(nodelist):
Expand Down

0 comments on commit f4790a4

Please sign in to comment.