diff options
author | Marion <marion.zepf@gmail.com> | 2013-09-16 17:38:12 (GMT) |
---|---|---|
committer | Marion <marion.zepf@gmail.com> | 2013-09-16 17:38:12 (GMT) |
commit | ef51921c314d0bba8a38b0beb11d64cca7d0d239 (patch) | |
tree | 736844ead39d099275842ecf18dfedd9585ff243 | |
parent | 6aba5ce69c4fbbe05f9b5336d1420690b708c432 (diff) |
fix export of 'define action stack' block with non-string argument
-rw-r--r-- | TurtleArt/taexportpython.py | 3 |
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): |