Module: check_mk
Branch: master
Commit: 856b998f543450c2b239ff746f69b514ecd9e9b3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=856b998f543450…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Mar 28 16:10:30 2019 +0100
Remove unused FILE_PATH global variable for .mk config files
Check_MK base config files could contain references to a global
variable FILE_PATH. This is an unused variable for a long time
now. It was replaced by FOLDER_PATH in the early days of WATO.
The FILE_PATH variable has now been cleaned up. If your
configuration files contain such a variable, you need to clean
it up or replace it with FOLDER_PATH.
Change-Id: I34f493ee5d8a3af1b762e10caa9b18cc9831b395
---
cmk/gui/watolib/rulesets.py | 1 -
cmk_base/config.py | 3 ---
2 files changed, 4 deletions(-)
diff --git a/cmk/gui/watolib/rulesets.py b/cmk/gui/watolib/rulesets.py
index 264b05f..6d3967f 100644
--- a/cmk/gui/watolib/rulesets.py
+++ b/cmk/gui/watolib/rulesets.py
@@ -78,7 +78,6 @@ class RulesetCollection(object):
"ALL_SERVICES": [""],
"NEGATE": NEGATE,
"FOLDER_PATH": folder.path(),
- "FILE_PATH": folder.path() + "/hosts.mk",
}
# Prepare empty rulesets so that rules.mk has something to
diff --git a/cmk_base/config.py b/cmk_base/config.py
index ec99a5c..b2ed2b8 100644
--- a/cmk_base/config.py
+++ b/cmk_base/config.py
@@ -201,7 +201,6 @@ def _perform_post_config_loading_actions():
def _load_config(with_conf_d, exclude_parents_mk):
helper_vars = {
- "FILE_PATH": None,
"FOLDER_PATH": None,
}
@@ -222,12 +221,10 @@ def _load_config(with_conf_d, exclude_parents_mk):
if _f.startswith(cmk.utils.paths.check_mk_config_dir + "/"):
_file_path = _f[len(cmk.utils.paths.check_mk_config_dir) + 1:]
global_dict.update({
- "FILE_PATH": _file_path,
"FOLDER_PATH": os.path.dirname(_file_path),
})
else:
global_dict.update({
- "FILE_PATH": None,
"FOLDER_PATH": None,
})