On Fri, Feb 26, 2016 at 6:42 AM, Edward K. Ream <edream...@gmail.com> wrote:
Oops. hasOpenTask misuses the else clause after a for loop. There is no break statement, so it should be this: def hasOpenTask(p): > '''Return True if p is a top-level node containing any open task.''' > if p.parent(): > return False # Not a top-level node. > for p2 in p.self_and_subtree(): > tags = tc.get_tags(p2) > if 'open' in tags and 'todo' in tags: > return True > # p, the ultimate parent, has an open task within. > return False > EKR -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+unsubscr...@googlegroups.com. To post to this group, send email to leo-editor@googlegroups.com. Visit this group at https://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.