From 7564462077ba46ad4a11373da16ef95a13ed55b1 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Tue, 20 Apr 2021 10:52:16 +0100 Subject: [PATCH] keep debug prints (commented out), TODO, "debug log" mode --- src/budget_sync/budget_graph.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/budget_sync/budget_graph.py b/src/budget_sync/budget_graph.py index dccf4e2..d67f2f9 100644 --- a/src/budget_sync/budget_graph.py +++ b/src/budget_sync/budget_graph.py @@ -511,6 +511,10 @@ class BudgetGraph: if node.parent is None: continue node.parent.immediate_children.add(node) + # useful debug prints + #for bug in bugs: + # node = self.nodes[bug.id] + # print ("bug added", bug.id, node, node.parent.immediate_children) @cached_property def roots(self) -> Set[Node]: @@ -564,9 +568,14 @@ class BudgetGraph: errors.append(BudgetGraphNegativeMoney( node.bug.id, root.bug.id)) + childlist = [] subtasks_total = Money(0) for child in node.immediate_children: subtasks_total += child.fixed_budget_including_subtasks + childlist.append(child.bug.id) + # useful debug prints + #print ("subtask total", node.bug.id, root.bug.id, subtasks_total, + # childlist) payees_total = Money(0) payee_payments = {} -- 2.30.2