Mercurial > public > mercurial-scm > hg
diff hgext/mq.py @ 34138: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 | 62490b84ebf8 |
line wrap: on
line diff
--- a/hgext/mq.py Sun Sep 03 14:56:31 2017 +0900 +++ b/hgext/mq.py Sun Sep 03 15:16:01 2017 +0900 @@ -155,7 +155,7 @@ def inserthgheader(lines, header, value): """Assuming lines contains a HG patch header, add a header line with value. >>> try: inserthgheader([], b'# Date ', b'z') - ... except ValueError, inst: print("oops") + ... except ValueError as inst: print("oops") oops >>> inserthgheader([b'# HG changeset patch'], b'# Date ', b'z') ['# HG changeset patch', '# Date z']