From 35a0e0007883db99a5e9f6cf746c6b0787c36d96 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 5 Nov 2008 17:20:01 -0800 Subject: [PATCH] IGN:... --- src/calibre/utils/genshi/template/eval.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/utils/genshi/template/eval.py b/src/calibre/utils/genshi/template/eval.py index 0e9fae6d64..6970e32bd4 100644 --- a/src/calibre/utils/genshi/template/eval.py +++ b/src/calibre/utils/genshi/template/eval.py @@ -178,7 +178,7 @@ class Expression(Code): __traceback_hide__ = 'before_and_this' _globals = self._globals(data) code = self.code - if not isinstance(code, unicode): + if not isinstance(code, unicode) and isinstance(code, basestring): code = code.decode('utf-8', 'replace') return eval(code, _globals, {'__data__': data})