Mercurial > hg-stable
changeset 25170:c69f4f7fe01a
dagparser: use 'next' instead of try/except for default value
"Ich liebe es wenn ein Plan funktioniert."
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Mon, 18 May 2015 12:22:44 -0500 |
parents | 7855d1f5f152 |
children | d647f97f88dd |
files | mercurial/dagparser.py |
diffstat | 1 files changed, 1 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/dagparser.py Mon May 18 12:18:00 2015 -0500 +++ b/mercurial/dagparser.py Mon May 18 12:22:44 2015 -0500 @@ -176,10 +176,7 @@ chiter = (c for c in desc) def nextch(): - try: - return chiter.next() - except StopIteration: - return '\0' + return next(chiter, '\0') def nextrun(c, allow): s = ''