summaryrefslogtreecommitdiff
path: root/mako/filters.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2014-04-20 21:43:55 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2014-04-20 21:43:55 -0400
commit81f27474ff7795a59bf1547ab7042b6ae36ea907 (patch)
treeb3be1581a54c7468ce92f6d5dcb9fc238dcf56d5 /mako/filters.py
parent6d96ef8c2d454622070d2d63ed0a2a911cde3834 (diff)
downloadmako-w_json_metadata.tar.gz
- Fixed bug in ``decode.<encoding>`` filter where a non-string objectw_json_metadata
would not be correctly interpreted in Python 3.
Diffstat (limited to 'mako/filters.py')
-rw-r--r--mako/filters.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mako/filters.py b/mako/filters.py
index 369cbc3..ab7925f 100644
--- a/mako/filters.py
+++ b/mako/filters.py
@@ -64,7 +64,7 @@ class Decode(object):
if isinstance(x, compat.text_type):
return x
elif not isinstance(x, compat.binary_type):
- return compat.text_type(str(x), encoding=key)
+ return compat.text_type(x)
else:
return compat.text_type(x, encoding=key)
return decode