From 32c13d00fe23161340e87aa38933475b3571c68f Mon Sep 17 00:00:00 2001 From: David TARDIVEL Date: Fri, 26 Aug 2016 12:08:45 +0200 Subject: [PATCH] Fix loading of plugin configuration parameters When the load a plugin, we need to reload once the watcher configuration data, in order to include the plugin parameters in cfg.CONF data dict. To reload the conf, we just call self.conf(). But every time we call this method, cfg.CONF is cleaned, and we lost previously loaded parameters. This generated the exception RequiredOptError and the plugin was not correctly loaded. To fix it, we have just to add the watcher configuration filename as argument of self.conf(). Change-Id: Ic2384b68f6d604640127fe06893d0f808aee34b7 Closes-Bug: #1617240 --- watcher/common/loader/default.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/watcher/common/loader/default.py b/watcher/common/loader/default.py index 586cfd915..3ef63bc84 100644 --- a/watcher/common/loader/default.py +++ b/watcher/common/loader/default.py @@ -61,7 +61,7 @@ class DefaultLoader(base.BaseLoader): return driver def _reload_config(self): - self.conf() + self.conf(default_config_files=self.conf.default_config_files) def get_entry_name(self, name): return ".".join([self.namespace, name])