Skip to content

Commit

Permalink
Added StopIteration catch
Browse files Browse the repository at this point in the history
  • Loading branch information
bluemellophone committed Jan 28, 2021
1 parent 243b8ef commit a0a327c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions wbia/algo/graph/mixin_loops.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,11 @@ def main_gen(infr, max_loops=None, use_refresh=True):
if infr.params['redun.enabled'] and infr.params['redun.enforce_pos']:
infr.loop_phase = 'pos_redun_init'
# Fix positive redundancy of anything within the loop
for _ in infr.pos_redun_gen():
yield _
try:
for _ in infr.pos_redun_gen():
yield _
except StopIteration:
pass

infr.phase = 1
if infr.params['ranking.enabled']:
Expand Down

0 comments on commit a0a327c

Please sign in to comment.