Merge "Replace 'raise StopIteration' with 'return'"

This commit is contained in:
Zuul 2018-07-16 18:33:57 +00:00 committed by Gerrit Code Review
commit 1a4ca3545d
1 changed files with 2 additions and 2 deletions

View File

@ -243,7 +243,7 @@ class Backups(base.ManagerWithFind):
yield the_item
m = the_list[-1].id
else:
raise StopIteration()
return
def execution_list_generator():
yielded = 0
@ -254,7 +254,7 @@ class Backups(base.ManagerWithFind):
loaded=True)
yielded += 1
if limit and yielded == limit:
raise StopIteration()
return
return list(execution_list_generator())