Mercurial > public > mercurial-scm > hg
diff mercurial/manifest.py @ 24682:aef3d1469773
manifest.walk: use return instead of StopIteration in generator
Using "return" within a generator is supposedly more Pythonic than
raising StopIteration.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 07 Apr 2015 22:36:17 -0700 |
parents | dfb86af18a35 |
children | 4eaea0ed8dc1 |
line wrap: on
line diff
--- a/mercurial/manifest.py Wed Apr 08 23:30:02 2015 +0900 +++ b/mercurial/manifest.py Tue Apr 07 22:36:17 2015 -0700 @@ -228,7 +228,7 @@ if fset and not match.anypats() and util.all(fn in self for fn in fset): for fn in sorted(fset): yield fn - raise StopIteration + return for fn in self: if fn in fset: