Don't fail to find a plugin section

This commit is contained in:
Chris Jones 2010-02-07 12:41:08 +00:00
parent 8806c97612
commit f99fbf1094
1 changed files with 2 additions and 1 deletions

View File

@ -451,7 +451,6 @@ class ConfigBase(Borg):
configspecdata['layouts']['__many__'] = {} configspecdata['layouts']['__many__'] = {}
configspecdata['layouts']['__many__']['__many__'] = section configspecdata['layouts']['__many__']['__many__'] = section
# FIXME: should be properly loading plugins from built-in config
configspecdata['plugins'] = {} configspecdata['plugins'] = {}
configspec = ConfigObj(configspecdata) configspec = ConfigObj(configspecdata)
@ -498,6 +497,8 @@ class ConfigBase(Borg):
section[profile] = copy(DEFAULTS['profiles']['default']) section[profile] = copy(DEFAULTS['profiles']['default'])
section[profile].update(parser[section_name][profile]) section[profile].update(parser[section_name][profile])
elif section_name == 'plugins': elif section_name == 'plugins':
if not parser.has_key(section_name):
continue
for part in parser[section_name]: for part in parser[section_name]:
dbg('ConfigBase::load: Processing %s: %s' % (section_name, dbg('ConfigBase::load: Processing %s: %s' % (section_name,
part)) part))