From 7a6d0fbb9764b2e01ac3c2c9f2c1d28046ba8c2e Mon Sep 17 00:00:00 2001 From: Jay Pipes Date: Mon, 23 Dec 2013 20:58:31 -0500 Subject: [PATCH] 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 --- tools/check_i18n.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/check_i18n.py b/tools/check_i18n.py index 86207b80b..f9b31ebda 100644 --- a/tools/check_i18n.py +++ b/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