Fix bug when trying to delete configs from context which aren't there!

This commit is contained in:
Liam Young 2014-06-10 06:33:43 +00:00
parent de90ebb4f4
commit 6a1f4a7b6d

View File

@ -350,7 +350,8 @@ def register_configs():
# Files which are managed by the plugin
ceded_list = ['NEUTRON_OVS_PLUGIN_CONF', 'NEUTRON_ML2_PLUGIN_CONF']
for conf in ceded_list:
del CONFIG_FILES[name][plugin][conf]
if conf in CONFIG_FILES[name][plugin]:
del CONFIG_FILES[name][plugin][conf]
for conf in CONFIG_FILES[name][plugin]:
configs.register(conf,
CONFIG_FILES[name][plugin][conf]['hook_contexts'])