Remove deepcopy on config bundle return. Closes #14

master
Tom Wilson 6 years ago
parent fec4fa6070
commit ddf9821259

@ -161,7 +161,7 @@ class ConfigManager():
conf_spec: (ConfigSpecification) Optional config specification to validate against. conf_spec: (ConfigSpecification) Optional config specification to validate against.
Returns: Returns:
dict: A deepcopy of the validated config bundle. dict: The validated config bundle.
Raises: Raises:
InvalidConfigError: If the canfig source fails validation, or a matching config InvalidConfigError: If the canfig source fails validation, or a matching config
@ -184,7 +184,7 @@ class ConfigManager():
raise raise
self.root_config[bundle_name] = bundle_source self.root_config[bundle_name] = bundle_source
return deepcopy(bundle_source) return self.root_config[bundle_name]
def validate_bundles(self, bundle_names=None): def validate_bundles(self, bundle_names=None):
""" """
@ -197,7 +197,7 @@ class ConfigManager():
ConfigManager. ConfigManager.
Returns: Returns:
dict: A dict of deepcopied config bundles, with keys matching those passed in dict: A dict of the config bundles, with keys matching those passed in
``bundle_names``. ``bundle_names``.
""" """
if bundle_names is None: if bundle_names is None:
@ -227,7 +227,7 @@ class ConfigManager():
bundle_name: (str) Name of the config bundle to find. bundle_name: (str) Name of the config bundle to find.
Returns: Returns:
dict: A deepcopy of the validated config bundle. dict: The validated config bundle.
""" """
if bundle_name not in self.root_config: if bundle_name not in self.root_config:
@ -245,7 +245,7 @@ class ConfigManager():
bundle_names: A list of config bundle names to get. bundle_names: A list of config bundle names to get.
Returns: Returns:
dict: A dict of validated config bundles, with keys matching those passed in dict: A dict of the validated config bundles, with keys matching those passed in
``bundle_names``. ``bundle_names``.
""" """
if bundle_names is None: if bundle_names is None:

Loading…
Cancel
Save