Module: check_mk
Branch: master
Commit: cf7feae25d9765cb6e3c79591863e4285b2c6868
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=cf7feae25d9765…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Mon Jun 11 14:01:07 2018 +0200
Removed unused parameter. Reduced scope of funcion.
Change-Id: I8629139c465bbb89b671dfbf3acded09a2f88bce
---
cmk_base/inventory_plugins.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/cmk_base/inventory_plugins.py b/cmk_base/inventory_plugins.py
index 4db511f..c2de150 100644
--- a/cmk_base/inventory_plugins.py
+++ b/cmk_base/inventory_plugins.py
@@ -62,10 +62,10 @@ def load(): # pylint: disable=function-redefined
continue # skip already loaded files (e.g. from local)
try:
- plugin_context = _new_inv_context(f)
+ plugin_context = _new_inv_context()
known_plugins = inv_info.keys()
- load_plugin_includes(f, plugin_context)
+ _load_plugin_includes(f, plugin_context)
execfile(f, plugin_context)
loaded_files.add(file_name)
@@ -81,7 +81,7 @@ def load(): # pylint: disable=function-redefined
_plugin_contexts[check_plugin_name] = plugin_context
-def _new_inv_context(plugin_file_path):
+def _new_inv_context():
# Add the data structures where the inventory plugins register with Check_MK
context = {
"inv_info" : inv_info,
@@ -101,7 +101,7 @@ def _new_inv_context(plugin_file_path):
# Load the definitions of the required include files for this check
# Working with imports when specifying the includes would be much cleaner,
# sure. But we need to deal with the current check API.
-def load_plugin_includes(check_file_path, plugin_context):
+def _load_plugin_includes(check_file_path, plugin_context):
for include_file_name in checks.includes_of_plugin(check_file_path):
include_file_path = os.path.join(cmk.paths.inventory_dir, include_file_name)