Skip to content

Commit

Permalink
Fix a KeyError exception. #531696
Browse files Browse the repository at this point in the history
  • Loading branch information
fujiwarat committed Nov 24, 2009
1 parent 68ed9d1 commit 33ad32c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions engine/engine.py
Expand Up @@ -952,6 +952,11 @@ def CONFIG_RELOADED(cls, bus):
@classmethod
def CONFIG_VALUE_CHANGED(cls, bus, section, name, value):
print 'VALUE_CHAMGED =', section, name, value

if not section.startswith("engine/anthy"):
# This value is used for ibus.config.set_value only.
return

base_sec = section[len(cls.__prefs._prefix) + 1:]
sec = cls._get_shortcut_type()
if base_sec == sec:
Expand All @@ -972,9 +977,6 @@ def CONFIG_VALUE_CHANGED(cls, bus, section, name, value):
cls.__prefs.set_value(base_sec, name, value)
if name == 'shortcut_type':
cls.__keybind = cls._mk_keybind()
elif section == 'panel':
# This value is used for ibus.config.set_value only.
pass
elif base_sec:
cls.__prefs.set_value(base_sec, name, value)
else:
Expand Down

0 comments on commit 33ad32c

Please sign in to comment.