From cd3679d0f4cd5f43a10b31da9b64456a4365aec1 Mon Sep 17 00:00:00 2001 From: Marion Date: Mon, 19 Aug 2013 00:24:52 +0000 Subject: fix issue in utility for extracting the name of an action stack --- 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 -- cgit v0.9.1