From 9ff3913e02f6178537a79a44fe9a07eb3e1f20c1 Mon Sep 17 00:00:00 2001 From: Charles Haley <> Date: Sun, 19 Aug 2012 14:16:48 +0200 Subject: [PATCH] Fix rare problem in compiled template functions where numeric results were not converted to string. --- src/calibre/utils/formatter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/utils/formatter.py b/src/calibre/utils/formatter.py index 97b985487e..89e2395dff 100644 --- a/src/calibre/utils/formatter.py +++ b/src/calibre/utils/formatter.py @@ -289,7 +289,7 @@ class _CompileParser(_Parser): if self.compile_text: self.compile_text += ( "\targs[%d].append(self.__funcs__['%s']" - ".evaluate(formatter, kwargs, book, locals, *args[%d]))\n")%(level, id, level+1) + ".eval_(formatter, kwargs, book, locals, *args[%d]))\n")%(level, id, level+1) return cls.eval_(self.parent, self.parent_kwargs, self.parent_book, self.parent_locals, *args) elif self.token_is_constant():