Commit 488d1abf authored by Bram Schoenmakers's avatar Bram Schoenmakers

Only print headers for valid groups

When no valid grouping could be made, an empty header would be printed
(0 length group label, zero = characters below).

The empty tuple represents the initial grouping.
parent ca1d7c43
......@@ -100,7 +100,11 @@ class PrettyPrinter(Printer):
result.append("=" * len(key_string))
for key, todos in p_groups.items():
if key != ():
# don't print a header for the case that no valid grouping
# could be made (e.g. an invalid group expression)
print_header(key)
first = False
result += self.print_list(todos)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment