Fix bug in duplicate remove indices

This commit is contained in:
Matt Guthaus 2018-10-25 14:40:39 -07:00
parent 3407163cf1
commit 9e5d78cfc2
1 changed files with 2 additions and 3 deletions

View File

@ -167,7 +167,7 @@ class router(router_tech):
# Make a copy since we are going to reduce this list
pin_groups = self.pin_groups[pin_name].copy()
remove_indices = []
remove_indices = set()
for index1,pg1 in enumerate(self.pin_groups[pin_name]):
for index2,pg2 in enumerate(self.pin_groups[pin_name]):
@ -180,8 +180,7 @@ class router(router_tech):
combined.grids = pg1.grids | pg2.grids
# check if there are any blockage problems??
remove_indices.append(index1)
remove_indices.append(index2)
remove_indices.update([index1,index2])
pin_groups.append(combined)
# Remove them in decreasing order to not invalidate the indices