Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu@tomeuvizoso.net>2007-08-26 18:21:49 (GMT)
committer Tomeu Vizoso <tomeu@tomeuvizoso.net>2007-08-26 18:21:49 (GMT)
commitcf7ff39c5ad7750f71baeded213f04a89470e658 (patch)
tree7feafc50da72eb12f4f1d5877fc02c0dda7b0113 /sugar
parentdb02d6b54c0d7bd6beee0d8f91378432440aefa4 (diff)
Allow for None values in fill-color and stroke-color.
Diffstat (limited to 'sugar')
-rw-r--r--sugar/graphics/icon.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sugar/graphics/icon.py b/sugar/graphics/icon.py
index 7912208..8e36e14 100644
--- a/sugar/graphics/icon.py
+++ b/sugar/graphics/icon.py
@@ -415,12 +415,12 @@ class CanvasIcon(hippo.CanvasBox, hippo.CanvasItem):
self.props.fill_color = value.get_fill_color()
self.props.stroke_color = value.get_stroke_color()
elif pspec.name == 'fill-color':
- if not isinstance(value, basestring):
+ if not isinstance(value, basestring) and value is not None:
raise TypeError('fill-color must be a string, not %r' % type(value))
self._buffer.fill_color = value
self.emit_paint_needed(0, 0, -1, -1)
elif pspec.name == 'stroke-color':
- if not isinstance(value, basestring):
+ if not isinstance(value, basestring) and value is not None:
raise TypeError('stroke-color must be a string, not %r' % type(value))
self._buffer.stroke_color = value
self.emit_paint_needed(0, 0, -1, -1)