From a0a327ca721e7535ec69548e5b5898b71c299199 Mon Sep 17 00:00:00 2001 From: Jason Parham Date: Thu, 28 Jan 2021 10:27:01 -0800 Subject: [PATCH] Added StopIteration catch --- wbia/algo/graph/mixin_loops.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wbia/algo/graph/mixin_loops.py b/wbia/algo/graph/mixin_loops.py index b463d60f09..eb92b3b5b6 100644 --- a/wbia/algo/graph/mixin_loops.py +++ b/wbia/algo/graph/mixin_loops.py @@ -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']: