Plugins that have never given us config before need a dict created for them before they can set values

This commit is contained in:
Chris Jones 2010-01-05 22:15:56 +00:00
parent 299e4cc5a8
commit 710b8a4834
1 changed files with 2 additions and 0 deletions

View File

@ -443,6 +443,8 @@ class ConfigBase(Borg):
elif key == 'keybindings':
self.keybindings = value
elif plugin is not None:
if not self.plugins.has_key(plugin):
self.plugins[plugin] = {}
self.plugins[plugin][key] = value
else:
raise KeyError('ConfigBase::set_item: unknown key %s' % key)