Skip to content

Commit 7d42235

Browse files
committed
Remove unused nodes list
Signed-off-by: marinamoore <mnm678@gmail.com>
1 parent c19fa4b commit 7d42235

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
@@ -1654,7 +1654,6 @@ def _build_merkle_tree(fileinfodict):
16541654
# We will build the merkle tree starting with the leaf nodes. Each
16551655
# leaf contains snapshot information for a single metadata file.
16561656
leaves = []
1657-
nodes = []
16581657
for name, contents in sorted(fileinfodict.items()):
16591658
if name.endswith(".json"):
16601659
name = os.path.splitext(name)[0]
@@ -1680,9 +1679,8 @@ def _build_merkle_tree(fileinfodict):
16801679
# Otherwise, use the next two nodes to build a new node.
16811680
else:
16821681
n = InternalNode(current_nodes[i], current_nodes[i+1])
1683-
# Add this node to the next level, and to a list of all nodes
1682+
# Add this node to the next level
16841683
new_nodes.append(n)
1685-
nodes.append(n)
16861684
current_nodes = new_nodes
16871685

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

0 commit comments

Comments
 (0)