diff --git a/lib/ssconf.py b/lib/ssconf.py index 74874f6c58f17d4628e3c4bbada987b90a904bf4..630a3f64b7b49a3f68c4ab626f5a58d9a6e6451a 100644 --- a/lib/ssconf.py +++ b/lib/ssconf.py @@ -52,14 +52,20 @@ class SimpleConfigReader(object): """ self._file_name = file_name + self.Reload() + + def Reload(self): + """Reloads the config file. + + """ try: - self._config_data = serializer.Load(utils.ReadFile(file_name)) + self._config_data = serializer.Load(utils.ReadFile(self._file_name)) except IOError, err: raise errors.ConfigurationError("Cannot read config file %s: %s" % - (file_name, err)) + (self._file_name, err)) except ValueError, err: raise errors.ConfigurationError("Cannot load config file %s: %s" % - (file_name, err)) + (self._file_name, err)) def GetClusterName(self): return self._config_data["cluster"]["cluster_name"]