summaryrefslogtreecommitdiff
path: root/setup/prefs.py
diff options
context:
space:
mode:
authorfujiwarat <takao.fujiwara1@gmail.com>2010-11-15 13:25:11 +0900
committerfujiwarat <takao.fujiwara1@gmail.com>2010-11-15 13:25:11 +0900
commitaaa2f6ad0ff5da7915b33b5d30ded25def187e7c (patch)
treec3ca301f181d2fdebe4ae114cc8f0bbfa3fab6dc /setup/prefs.py
parentfec83a2862a021a4cda94a07abd16b151c5f1525 (diff)
downloadibus-anthy-aaa2f6ad0ff5da7915b33b5d30ded25def187e7c.tar.gz
Fixed SEGV when key tables are customized in new gconf.
Diffstat (limited to 'setup/prefs.py')
-rw-r--r--setup/prefs.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/setup/prefs.py b/setup/prefs.py
index f3f0781..66f2cd6 100644
--- a/setup/prefs.py
+++ b/setup/prefs.py
@@ -57,6 +57,10 @@ class Prefs(object):
return self.default[section][key]
def set_value(self, section, key, value):
+ if section not in self.sections():
+ self.set_new_section(section)
+ if key not in self.keys(section):
+ self.set_new_key(section, key)
self.default[section][key]
self.new.setdefault(section, {})[key] = value