Corrects broken format strings in check_i18n.py
In tools/check_i18n.py, the error messages printed out had format strings that included 5 interpolations, but only four variables were supplied. This patch simply corrects that mismatch by including the name of the predicate or checker that failed. Closes-Bug: #1263813 Change-Id: I5cacee9ea000f56a9ef45f07367e85f20fa333c7
This commit is contained in:
parent
e3797e36a4
commit
40432c7e12
@ -59,7 +59,8 @@ class Visitor(object):
|
|||||||
if checker(node):
|
if checker(node):
|
||||||
print('%s:%d %s: %s Error: %s' %
|
print('%s:%d %s: %s Error: %s' %
|
||||||
(self.filename, node.lineno,
|
(self.filename, node.lineno,
|
||||||
self.lines[node.lineno - 1][:-1], msg),
|
self.lines[node.lineno - 1][:-1],
|
||||||
|
checker.__name__, msg),
|
||||||
file=sys.stderr)
|
file=sys.stderr)
|
||||||
self.error = 1
|
self.error = 1
|
||||||
return
|
return
|
||||||
@ -81,7 +82,8 @@ class Visitor(object):
|
|||||||
elif action == 'error':
|
elif action == 'error':
|
||||||
print('%s:%d %s: %s Error: %s' %
|
print('%s:%d %s: %s Error: %s' %
|
||||||
(self.filename, node.lineno,
|
(self.filename, node.lineno,
|
||||||
self.lines[node.lineno - 1][:-1], msg),
|
self.lines[node.lineno - 1][:-1],
|
||||||
|
predicate.__name__, msg),
|
||||||
file=sys.stderr)
|
file=sys.stderr)
|
||||||
self.error = 1
|
self.error = 1
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user