Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TurtleArt
diff options
context:
space:
mode:
authorWalter Bender <walter.bender@gmail.com>2011-03-31 13:06:17 (GMT)
committer Walter Bender <walter.bender@gmail.com>2011-03-31 13:06:17 (GMT)
commit74f406b505a762c8e55b210539a13ed66b0ae50a (patch)
treea324f52372b7cd2eebee1609c2cbd5a1bebf2a24 /TurtleArt
parent0545a72ada331a7d5e7466d8424ba848caaec26c (diff)
catch IndexError exception that was causing run_blocks to fail
Diffstat (limited to 'TurtleArt')
-rw-r--r--TurtleArt/talogo.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/TurtleArt/talogo.py b/TurtleArt/talogo.py
index 59eb3c8..4662429 100644
--- a/TurtleArt/talogo.py
+++ b/TurtleArt/talogo.py
@@ -180,7 +180,11 @@ class LogoCode:
if b.connections is not None and len(b.connections) > 1 and \
b.connections[1] is not None:
code = self._blocks_to_code(b)
- x = b.connections[1].values[0]
+ try:
+ x = b.connections[1].values[0]
+ except IndexError:
+ self.tw.showlabel('#nostack')
+ return None
if type(convert(x, float, False)) == float:
if int(float(x)) == x:
x = int(x)