Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TurtleArt/taexportpython.py
diff options
context:
space:
mode:
authorMarion <marion.zepf@gmail.com>2013-08-30 10:31:03 (GMT)
committer Marion <marion.zepf@gmail.com>2013-08-30 10:31:03 (GMT)
commit0ea96aec70d8126b67db71c5e3c810b7174b4def (patch)
tree34d231173f24de7fdfb8ad0b1540bff1bc7cc866 /TurtleArt/taexportpython.py
parent24532f3f17ab8d88f0b3475ea05a2704da8526d6 (diff)
fix bug in Python export tool re. non-value blocks as arguments
Diffstat (limited to 'TurtleArt/taexportpython.py')
-rw-r--r--TurtleArt/taexportpython.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/TurtleArt/taexportpython.py b/TurtleArt/taexportpython.py
index 88a73a0..cde39e9 100644
--- a/TurtleArt/taexportpython.py
+++ b/TurtleArt/taexportpython.py
@@ -192,15 +192,19 @@ def _walk_action_stack(top_block, lc):
else:
# embedded stack of blocks (body of conditional or loop) or
# argument block
- new_arg_asts = _walk_action_stack(conn, lc)
if dock[0] == 'flow':
# body of conditional or loop
+ new_arg_asts = _walk_action_stack(conn, lc)
if prim == LogoCode.prim_loop:
new_arg_asts.append(_ast_yield_true())
arg_asts.append(new_arg_asts)
else:
# argument block
- arg_asts.append(*new_arg_asts)
+ if conn.is_value_block():
+ new_arg_asts = _walk_action_stack(conn, lc)
+ arg_asts.append(*new_arg_asts)
+ else:
+ arg_asts.append(_get_prim(conn))
# finish off last block
_finish_off(block, prim)