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-08-19 00:24:52 (GMT)
committer Marion <marion.zepf@gmail.com>2013-08-19 00:24:52 (GMT)
commitcd3679d0f4cd5f43a10b31da9b64456a4365aec1 (patch)
treee2a42eee6afc708d73bff11d03c1581fbb82f4fc
parente6b715fc4e0bf6afc653240c2051d97e517ab558 (diff)
fix issue in utility for extracting the name of an action stack
-rw-r--r--TurtleArt/tautils.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/TurtleArt/tautils.py b/TurtleArt/tautils.py
index a8ef384..379a1d3 100644
--- a/TurtleArt/tautils.py
+++ b/TurtleArt/tautils.py
@@ -822,7 +822,11 @@ def get_stack_name(blk):
elif top_block.name == 'hat':
try:
return top_block.connections[1].values[0]
- except (IndexError, AttributeError):
+ except (AttributeError, TypeError, IndexError):
+ # AttributeError: t_b has no attribute 'connections' or t_b.c[1]
+ # has no attribute 'value'
+ # TypeError: t_b.c or t_b.c[1].v is not a subscriptable sequence
+ # IndexError: t_b.c or t_b.c[1].v is too short
return None
else:
return None