Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Bender <walter@sugarlabs.org>2013-10-08 01:26:59 (GMT)
committer Walter Bender <walter@sugarlabs.org>2013-10-08 01:26:59 (GMT)
commit35c9eb6bd292b2fa03c2f33ae3cf5f8033493708 (patch)
treecf92c99656e8c2273b2386a0290001bac71cab8c
parent324c6e5a82f82806eace2345139460533f25955c (diff)
cleanup debug output
-rw-r--r--TurtleArt/tapalette.py20
-rw-r--r--plugins/turtle_blocks_extras/turtle_blocks_extras.py1
2 files changed, 8 insertions, 13 deletions
diff --git a/TurtleArt/tapalette.py b/TurtleArt/tapalette.py
index 7341c3e..6fd347a 100644
--- a/TurtleArt/tapalette.py
+++ b/TurtleArt/tapalette.py
@@ -129,7 +129,7 @@ class Palette():
def add_palette(self, position=None, init_on_start=False):
if self._name is None:
- debug_output('You must specify a name for your palette', True)
+ print 'You must specify a name for your palette'
return
# Insert new palette just before the trash
@@ -145,8 +145,6 @@ class Palette():
if self._name not in palette_names:
palette_names.insert(i, self._name)
- debug_output('adding %s to palette_i18n_names' % _(self._name),
- True)
palette_i18n_names.insert(i, _(self._name))
palette_blocks.insert(i, [])
block_colors.insert(i, self._colors)
@@ -240,7 +238,6 @@ def make_palette(palette_name, colors=None, help_string=None, position=None,
def palette_name_to_index(palette_name):
''' Find the index associated with palette_name. '''
- debug_output(palette_name, True)
if palette_name in palette_names:
return palette_names.index(palette_name)
elif palette_name in palette_i18n_names:
@@ -276,7 +273,7 @@ class Block():
def add_block(self, position=None):
if self._name is None:
- debug_output('You must specify a name for your block')
+ print 'You must specify a name for your block'
return
# FIXME: Does the block already exist? A block can live on
@@ -285,7 +282,7 @@ class Block():
# all lists except palettes before regeneration.
if self._style is None:
- debug_output('You must specify a style for your block')
+ print 'You must specify a style for your block'
return
else:
block_styles[self._style].append(self._name)
@@ -302,8 +299,8 @@ class Block():
if self._palette is not None:
i = palette_names.index(self._palette)
if self._name in palette_blocks[i]:
- debug_output('%s already in palette %s, skipping...' %
- (self._name, self._palette))
+ print '%s already in palette %s, skipping...' % \
+ (self._name, self._palette)
else:
if position is not None and isinstance(position, int) and \
position < len(palette_blocks[i]):
@@ -311,8 +308,7 @@ class Block():
else:
palette_blocks[i].append(self._name)
if position is not None:
- debug_output('Ignoring position (%s)' %
- (str(position)))
+ print 'Ignoring position (%s)' % (str(position))
if self._help is not None:
help_strings[self._name] = self._help
@@ -366,7 +362,7 @@ class Block():
def set_palette(self, palette):
if not palette in palette_names:
- debug_output('Could not find palette %s' % (palette))
+ print 'Could not find palette %s' % (palette)
else:
self._palette = palette
@@ -390,7 +386,7 @@ class Block():
def set_style(self, style):
if style not in block_styles:
- debug_output('Unknown style: %s' % (style))
+ print 'Unknown style: %s' % (style)
else:
self._style = style
diff --git a/plugins/turtle_blocks_extras/turtle_blocks_extras.py b/plugins/turtle_blocks_extras/turtle_blocks_extras.py
index 6aa3f8f..defd35f 100644
--- a/plugins/turtle_blocks_extras/turtle_blocks_extras.py
+++ b/plugins/turtle_blocks_extras/turtle_blocks_extras.py
@@ -998,7 +998,6 @@ Journal objects'))
if hasattr(self.tw, 'macros_path') and \
os.path.exists(self.tw.macros_path):
files = glob.glob(os.path.join(self.tw.macros_path, '*.tb'))
- debug_output('making myblocks palette', self.tw.running_sugar)
if len(files) > 0:
debug_output('creating %s palette' % _('my blocks'),
self.tw.running_sugar)