diff options
Diffstat (limited to 'mako/ext/babelplugin.py')
| -rw-r--r-- | mako/ext/babelplugin.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mako/ext/babelplugin.py b/mako/ext/babelplugin.py index e4feceb..2f6b7fb 100644 --- a/mako/ext/babelplugin.py +++ b/mako/ext/babelplugin.py @@ -113,10 +113,10 @@ def extract_nodes(nodes, keywords, comment_tags, options): translator_comments = \ [comment[1] for comment in translator_comments] - if not compat.py3k and isinstance(code, compat.text_type): + if isinstance(code, compat.text_type): code = code.encode('ascii', 'backslashreplace') - code = StringIO(code) + code = compat.byte_buffer(code) for lineno, funcname, messages, python_translator_comments \ in extract_python(code, keywords, comment_tags, options): yield (node.lineno + (lineno - 1), funcname, messages, |
