diff options
author | Walter Bender <walter@walter-laptop.(none)> | 2010-02-13 15:37:01 (GMT) |
---|---|---|
committer | Walter Bender <walter@walter-laptop.(none)> | 2010-02-13 15:37:01 (GMT) |
commit | b9d0b88bd022b54955be5addf865ee9dfa0a8cdb (patch) | |
tree | a095011aca712cc8d1fc4691f29d2fc8d6255cd5 | |
parent | 75fa65002dac407e064d168610c438f3db69258e (diff) |
don't display label None
-rw-r--r-- | tablock.py | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -73,13 +73,6 @@ class Blocks: # A class for the individual blocks # class Block: - # - # TODO: - # block data should be stored in block, not in block.spr.label - # Logo code - # HTML code - # debug code - # etc. def __init__(self, block_list, sprite_list, name, x, y, type='block', values=[], scale=BLOCK_SCALE, colors=["#FF0000","#A00000"]): self.spr = None @@ -246,7 +239,8 @@ class Block: if self.name in CONTENT_BLOCKS and len(self.values) > 0: for i, v in enumerate(self.values): - self._set_labels(i, str(v)) + if v is not None: + self._set_labels(i, str(v)) elif BLOCK_NAMES.has_key(self.name): for i, n in enumerate(BLOCK_NAMES[self.name]): self._set_labels(i, n) |