diff --git a/src/sugar/graphics/xocolor.py b/src/sugar/graphics/xocolor.py index df609178..395e3454 100644 --- a/src/sugar/graphics/xocolor.py +++ b/src/sugar/graphics/xocolor.py @@ -209,6 +209,10 @@ colors = [ def _parse_string(color_string): + if not isinstance(color_string, (str, unicode)): + logging.error('Invalid color string: %r', color_string) + return None + if color_string == 'white': return ['#ffffff', '#414141'] elif color_string == 'insensitive':