mercurial/templater.py
changeset 45799 0fc8b066928a
parent 45462 e53a3d0ef416
child 45901 18489e26d9a0
--- a/mercurial/templater.py	Tue Oct 20 08:58:20 2020 -0700
+++ b/mercurial/templater.py	Thu Oct 22 09:58:05 2020 -0700
@@ -312,9 +312,9 @@
 
 
 def _addparseerrorhint(inst, tmpl):
-    if len(inst.args) <= 1:
-        return  # no location
-    loc = inst.args[1]
+    if inst.location is None:
+        return
+    loc = inst.location
     # Offset the caret location by the number of newlines before the
     # location of the error, since we will replace one-char newlines
     # with the two-char literal r'\n'.