Browse Source

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
changes/58/63858/2
Jay Pipes 9 years ago
parent
commit
f778931252
  1. 6
      tools/check_i18n.py

6
tools/check_i18n.py

@ -59,7 +59,8 @@ class Visitor(object):
if checker(node):
print('%s:%d %s: %s Error: %s' %
(self.filename, node.lineno,
self.lines[node.lineno - 1][:-1], msg),
self.lines[node.lineno - 1][:-1],
checker.__name__, msg),
file=sys.stderr)
self.error = 1
return
@ -81,7 +82,8 @@ class Visitor(object):
elif action == 'error':
print('%s:%d %s: %s Error: %s' %
(self.filename, node.lineno,
self.lines[node.lineno - 1][:-1], msg),
self.lines[node.lineno - 1][:-1],
predicate.__name__, msg),
file=sys.stderr)
self.error = 1
return

Loading…
Cancel
Save