Skip to content

Commit

Permalink
adding py.27 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonGreenhill committed Feb 22, 2016
1 parent bd01efe commit c4ecb13
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions treemaker/treemaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,9 @@ def tips(self, node=None):
"""Returns a list of the tips in the tree"""
node = self if node is None else node
for child in node.children:
if child.is_node:
yield from self.tips(child)
if child.is_node: # remove yield from so we can support py2.7
for n in self.tips(child):
yield n
if child.is_tip:
yield child

Expand Down

0 comments on commit c4ecb13

Please sign in to comment.