From 7cb4a1d72dddaf729bc1cf4706e5cea319687fa3 Mon Sep 17 00:00:00 2001 From: Daniel Narvaez Date: Tue, 9 Apr 2013 18:06:13 +0200 Subject: [PATCH] Handle invalid /desktop/sugar/user/color This is currently breaking the activity list unit test where the profile has not been initialized. But, more in general, it seems like we should not be crashing if our settings has unexpected values. --- src/sugar3/graphics/xocolor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sugar3/graphics/xocolor.py b/src/sugar3/graphics/xocolor.py index c9af6b1b..84e93a99 100644 --- a/src/sugar3/graphics/xocolor.py +++ b/src/sugar3/graphics/xocolor.py @@ -239,7 +239,7 @@ class XoColor: 'fallback to default', color_string) client = GConf.Client.get_default() color_string = client.get_string('/desktop/sugar/user/color') - randomize = False + randomize = is_valid(color_string) else: randomize = False