Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/parser.py @ 31362:089e37802fb3
parser: use %d instead of %s for interpolating error position
Error position is an int, so we should use %d instead of %s. Fixes
failures on Python 3.
author | Augie Fackler <augie@google.com> |
---|---|
date | Sun, 12 Mar 2017 00:44:59 -0500 |
parents | c3a3896a9fa8 |
children | afb335353d28 |
comparison
equal
deleted
inserted
replaced
31361:667e88568087 | 31362:089e37802fb3 |
---|---|
263 | 263 |
264 def parseerrordetail(inst): | 264 def parseerrordetail(inst): |
265 """Compose error message from specified ParseError object | 265 """Compose error message from specified ParseError object |
266 """ | 266 """ |
267 if len(inst.args) > 1: | 267 if len(inst.args) > 1: |
268 return _('at %s: %s') % (inst.args[1], inst.args[0]) | 268 return _('at %d: %s') % (inst.args[1], inst.args[0]) |
269 else: | 269 else: |
270 return inst.args[0] | 270 return inst.args[0] |
271 | 271 |
272 class alias(object): | 272 class alias(object): |
273 """Parsed result of alias""" | 273 """Parsed result of alias""" |