summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Volugine <phil.volguine@gmail.com>2013-09-10 03:27:32 -0400
committerPhilipp Volugine <phil.volguine@gmail.com>2013-09-10 03:27:32 -0400
commit951c174da8f2bc22cb539c74fcb37bd850fd8640 (patch)
treeedbe38fa4e50a686142984d73cd3b72d69b206a0
parentabf4d7611349aed5427189d8a8be2cbbe227a9d2 (diff)
downloadmako-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.py3
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)