diff options
author | Marion <marion.zepf@gmail.com> | 2013-08-19 00:24:52 (GMT) |
---|---|---|
committer | Marion <marion.zepf@gmail.com> | 2013-08-19 00:24:52 (GMT) |
commit | cd3679d0f4cd5f43a10b31da9b64456a4365aec1 (patch) | |
tree | e2a42eee6afc708d73bff11d03c1581fbb82f4fc | |
parent | e6b715fc4e0bf6afc653240c2051d97e517ab558 (diff) |
fix issue in utility for extracting the name of an action stack
-rw-r--r-- | TurtleArt/tautils.py | 6 |
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 |