mercurial/parser.py
changeset 45776 0fc8b066928a
parent 43787 be8552f25cab
child 45942 89a2afe31e82
--- 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):