+def print_budget_then_children(indent, nodes, bug_id):
+ """recursive indented printout of budgets
+ """
+
+ bug = nodes[bug_id]
+ print("bug #%5d %s budget %7s excltasks %7s" % \
+ (bug.bug.id, ' ' * (indent*4),
+ str(bug.budget_including_subtasks),
+ str(bug.budget_excluding_subtasks)))
+ #print (repr(bug))
+ for child in bug.immediate_children:
+ if (str(child.budget_including_subtasks) == "0" and
+ str(child.budget_excluding_subtasks) == "0"):
+ continue
+ print_budget_then_children(indent+1, nodes, child.bug.id)
+
+