Skip to content

Commit 28cc103

Browse files
committed
Remove unused nodes list
Signed-off-by: marinamoore <mnm678@gmail.com>
1 parent 68c4812 commit 28cc103

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

tuf/repository_lib.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1640,7 +1640,6 @@ def _build_merkle_tree(fileinfodict):
16401640
# We will build the merkle tree starting with the leaf nodes. Each
16411641
# leaf contains snapshot information for a single metadata file.
16421642
leaves = []
1643-
nodes = []
16441643
for name, contents in sorted(fileinfodict.items()):
16451644
if name.endswith(".json"):
16461645
name = os.path.splitext(name)[0]
@@ -1666,9 +1665,8 @@ def _build_merkle_tree(fileinfodict):
16661665
# Otherwise, use the next two nodes to build a new node.
16671666
else:
16681667
n = InternalNode(current_nodes[i], current_nodes[i+1])
1669-
# Add this node to the next level, and to a list of all nodes
1668+
# Add this node to the next level
16701669
new_nodes.append(n)
1671-
nodes.append(n)
16721670
current_nodes = new_nodes
16731671

16741672
# The only node remaining in current_nodes will be the root node.

0 commit comments

Comments
 (0)