From ef51921c314d0bba8a38b0beb11d64cca7d0d239 Mon Sep 17 00:00:00 2001 From: Marion Date: Mon, 16 Sep 2013 17:38:12 +0000 Subject: fix export of 'define action stack' block with non-string argument --- 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): -- cgit v0.9.1