mercurial/smartset.py
changeset 32977 27ba0d8dc26c
parent 32821 9b7d615108d7
child 33072 6d767d62b25e
--- a/mercurial/smartset.py	Tue Jun 20 23:23:45 2017 -0400
+++ b/mercurial/smartset.py	Tue Jun 20 14:00:41 2017 -0700
@@ -871,7 +871,10 @@
                 if i < _len(genlist):
                     yield genlist[i]
                 else:
-                    yield _next(nextgen)
+                    try:
+                        yield _next(nextgen)
+                    except StopIteration:
+                        return
                 i += 1
         return gen()