Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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):