Don't wrap the option group in another list if it's already a list.

Signed-off-by: Sascha Silbe <sascha-...@silbe.org>

---
 extensions/cpsection/keyboard/model.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/extensions/cpsection/keyboard/model.py 
b/extensions/cpsection/keyboard/model.py
index 9d61c0c..089c2ea 100644
--- a/extensions/cpsection/keyboard/model.py
+++ b/extensions/cpsection/keyboard/model.py
@@ -142,8 +142,10 @@ class KeyboardManager(object):
     def set_option_group(self, option_group):
         """Sets the supplied option for switching keyboard group"""
         #XXX: Merge, not overwrite previous options
-        if option_group is None or not option_group:
+        if not option_group:
             options = ['']
+        elif isinstance(option_group, list):
+            options = option_group
         else:
             options = [option_group]
         self._gconf_client.set_list(_OPTIONS_KEY, gconf.VALUE_STRING, options)
-- 
tg: (a388ecf..) t/bug-2022 (depends on: upstream/master)
_______________________________________________
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel

Reply via email to