Skip to content

Commit

Permalink
Merge pull request #2300 from piotr1212/stopiteration
Browse files Browse the repository at this point in the history
replace raise StopIteration with return pep-0479
  • Loading branch information
deniszh committed May 28, 2018
2 parents 836b254 + 7b8bcf2 commit e15593a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion webapp/graphite/render/datalib.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def __consolidatingGenerator(self, gen):
else:
yield None

raise StopIteration
return


def __repr__(self):
Expand Down
2 changes: 1 addition & 1 deletion webapp/graphite/render/hashing.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def get_node(self, key):
def get_nodes(self, key):
nodes = set()
if not self.ring:
raise StopIteration
return
if self.nodes_len == 1:
for node in self.nodes:
yield node
Expand Down

0 comments on commit e15593a

Please sign in to comment.