Mercurial > public > mercurial-scm > hg-stable
diff mercurial/parser.py @ 45799:0fc8b066928a
errors: name arguments to ParseError constructor
As with similar previous patches, this is to improve readability.
Differential Revision: https://phab.mercurial-scm.org/D9240
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 22 Oct 2020 09:58:05 -0700 |
parents | be8552f25cab |
children | 89a2afe31e82 |
line wrap: on
line diff
--- a/mercurial/parser.py Tue Oct 20 08:58:20 2020 -0700 +++ b/mercurial/parser.py Thu Oct 22 09:58:05 2020 -0700 @@ -408,10 +408,10 @@ def parseerrordetail(inst): """Compose error message from specified ParseError object """ - if len(inst.args) > 1: - return _(b'at %d: %s') % (inst.args[1], inst.args[0]) + if inst.location is not None: + return _(b'at %d: %s') % (inst.location, inst.message) else: - return inst.args[0] + return inst.message class alias(object):