diff options
author | Philipp Volugine <phil.volguine@gmail.com> | 2013-09-10 03:27:32 -0400 |
---|---|---|
committer | Philipp Volugine <phil.volguine@gmail.com> | 2013-09-10 03:27:32 -0400 |
commit | 951c174da8f2bc22cb539c74fcb37bd850fd8640 (patch) | |
tree | edbe38fa4e50a686142984d73cd3b72d69b206a0 | |
parent | abf4d7611349aed5427189d8a8be2cbbe227a9d2 (diff) | |
download | mako-951c174da8f2bc22cb539c74fcb37bd850fd8640.tar.gz |
_ast_util.py added visit_NameConstant to SourceGen
SourceGenerator didn't work with python3.4 alpha,
`None` Is now a NameConstant rather than a Name in ast
the new method deals with converting it to a string
-rw-r--r-- | mako/_ast_util.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mako/_ast_util.py b/mako/_ast_util.py index cec767c..5b1a8e4 100644 --- a/mako/_ast_util.py +++ b/mako/_ast_util.py @@ -659,6 +659,9 @@ class SourceGenerator(NodeVisitor): def visit_Name(self, node): self.write(node.id) + def visit_NameConstant(self, node): + self.write(str(node.value)) + def visit_arg(self, node): self.write(node.arg) |