aboutsummaryrefslogtreecommitdiff
path: root/backend/data/trimTree.py
diff options
context:
space:
mode:
Diffstat (limited to 'backend/data/trimTree.py')
-rwxr-xr-xbackend/data/trimTree.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/backend/data/trimTree.py b/backend/data/trimTree.py
index 2642ca0..65e44e4 100755
--- a/backend/data/trimTree.py
+++ b/backend/data/trimTree.py
@@ -43,6 +43,7 @@ for name in nodesToKeep:
parent = row[0]
if parent not in nodesToKeep and parent not in ancestors:
ancestors.add(parent)
+ name = parent
continue
break
nodesToKeep.update(ancestors)
@@ -50,7 +51,7 @@ print(f"Total of {len(nodesToKeep)} nodes to keep")
# Find root node
query = "SELECT name FROM nodes LEFT JOIN edges ON nodes.name = edges.child WHERE edges.node IS NULL LIMIT 1"
(rootName,) = dbCur.execute(query).fetchone()
-print(f"Found root node \"{rootName\"}")
+print(f"Found root node '{rootName}'")
# Traverse tree, looking for trimmable nodes
print("Looking for trimmable nodes")
nodeToTipsChg = {}