Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TurtleArt/tablock.py
diff options
context:
space:
mode:
Diffstat (limited to 'TurtleArt/tablock.py')
-rw-r--r--TurtleArt/tablock.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/TurtleArt/tablock.py b/TurtleArt/tablock.py
index db9ef0b..b797ada 100644
--- a/TurtleArt/tablock.py
+++ b/TurtleArt/tablock.py
@@ -363,7 +363,11 @@ class Block:
if n == 0:
n = 1 # Force a scale to be set, even if there is no value.
else:
- n = len(BLOCK_NAMES[self.name])
+ if self.name in BLOCK_NAMES:
+ n = len(BLOCK_NAMES[self.name])
+ else:
+ _logger.debug("WARNING: unknown block name %s" % (self.name))
+ n = 0
for i in range(n):
if i == 1: # top
self.spr.set_label_attributes(int(self._font_size[1] + 0.5),