Module: check_mk
Branch: master
Commit: 1576b8538b1f44233b94ee2e17cfff89e97cbd2b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1576b8538b1f44…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Feb 20 09:22:37 2018 +0100
Really start with clean default settings when loading the config
Change-Id: I6148acc20f4695ded306f4e0dccf5d6e960fa83a
---
cmk_base/config.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/cmk_base/config.py b/cmk_base/config.py
index 7450960..c1e94a8 100644
--- a/cmk_base/config.py
+++ b/cmk_base/config.py
@@ -26,6 +26,7 @@
import os
import sys
+import copy
import marshal
import cmk.paths
@@ -51,7 +52,12 @@ def get_default_config():
"""Provides a dictionary containing the Check_MK default
configuration"""
cfg = {}
for key in get_variable_names():
- cfg[key] = getattr(default_config, key)
+ value = getattr(default_config, key)
+
+ if isinstance(value, dict) or isinstance(value, list):
+ value = copy.deepcopy(value)
+
+ cfg[key] = value
return cfg