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-04 10:13:06 (GMT)
committer Marion <marion.zepf@gmail.com>2013-09-04 10:13:06 (GMT)
commitf29d566962b303742ce96b547827e07137f44a52 (patch)
tree57f0adf9e787e70ae0fe5969352423a6c370107d
parente919179c2c5eeff3ab814f8c0927775f463671b7 (diff)
avoid double 'yield True' also inside loops
-rw-r--r--TurtleArt/taexportpython.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/TurtleArt/taexportpython.py b/TurtleArt/taexportpython.py
index 35365ac..0d1e27a 100644
--- a/TurtleArt/taexportpython.py
+++ b/TurtleArt/taexportpython.py
@@ -209,7 +209,8 @@ def _walk_action_stack(top_block, lc, convert_me=True):
# body of conditional or loop
new_arg_asts = _walk_action_stack(conn, lc,
convert_me=convert_me)
- if prim == LogoCode.prim_loop:
+ if (prim == LogoCode.prim_loop and
+ not isinstance(new_arg_asts[-1], ast.Yield)):
new_arg_asts.append(ast_yield_true())
arg_asts.append(new_arg_asts)
else: