Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/dagparser.py @ 34153:0f9936d80e01
doctest: upgrade old-style "except" clause
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 03 Sep 2017 15:16:01 +0900 |
parents | a8994d08e4a2 |
children | da9c4b0693c5 |
comparison
equal
deleted
inserted
replaced
34152:a8994d08e4a2 | 34153:0f9936d80e01 |
---|---|
155 | 155 |
156 Error: | 156 Error: |
157 | 157 |
158 >>> from . import pycompat | 158 >>> from . import pycompat |
159 >>> try: list(parsedag(b'+1 bad')) | 159 >>> try: list(parsedag(b'+1 bad')) |
160 ... except Exception, e: print(pycompat.sysstr(bytes(e))) | 160 ... except Exception as e: print(pycompat.sysstr(bytes(e))) |
161 invalid character in dag description: bad... | 161 invalid character in dag description: bad... |
162 | 162 |
163 ''' | 163 ''' |
164 if not desc: | 164 if not desc: |
165 return | 165 return |