Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarion <marion.zepf@gmail.com>2013-09-16 17:38:12 (GMT)
committer Marion <marion.zepf@gmail.com>2013-09-16 17:38:12 (GMT)
commitef51921c314d0bba8a38b0beb11d64cca7d0d239 (patch)
tree736844ead39d099275842ecf18dfedd9585ff243
parent6aba5ce69c4fbbe05f9b5336d1420690b708c432 (diff)
fix export of 'define action stack' block with non-string argument
-rw-r--r--TurtleArt/taexportpython.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/TurtleArt/taexportpython.py b/TurtleArt/taexportpython.py
index 9fa7b59..b31bf97 100644
--- a/TurtleArt/taexportpython.py
+++ b/TurtleArt/taexportpython.py
@@ -107,6 +107,9 @@ def save_python(tw):
def _action_stack_to_python(block, lc, name="start"):
""" Turn a stack of blocks into python code
name -- the name of the action stack (defaults to "start") """
+ if not isinstance(name, basestring):
+ name = str(name)
+
# traverse the block stack and get the AST for every block
ast_list = _walk_action_stack(block, lc)
if not isinstance(ast_list[-1], ast.Yield):