Module: check_mk
Branch: master
Commit: fb8ab6927a65ca37ded792a1447de6996325c208
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fb8ab6927a65ca…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Mar 14 16:29:57 2018 +0100
fixed further agent_netapp pylint errors
Change-Id: Ife010880dbc4112fbb98f38603ee92350d54ce73
---
agents/special/agent_netapp | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/agents/special/agent_netapp b/agents/special/agent_netapp
index 626c882..7b3a696 100755
--- a/agents/special/agent_netapp
+++ b/agents/special/agent_netapp
@@ -450,10 +450,15 @@ def create_dict(instances, custom_key = None, is_counter = True):
# Format config as one liner. Might add extra info identified by config_key
def format_config(instances, prefix, config_key, config_report = "all",
- config_scale = {}, config_rename = {},
- extra_info = {}, extra_info_report = "all",
+ config_scale = None, config_rename = None,
+ extra_info = None, extra_info_report = "all",
delimeter = "\t", skip_missing_config_key = False):
+
+ config_scale = {} if config_scale == None else config_scale
+ config_rename = {} if config_rename == None else config_rename
+ extra_info = {} if extra_info == None else extra_info
+
result = []
values = {}
@@ -562,7 +567,7 @@ def output_error_section():
nodes = []
def query_nodes(what, node_attribute = "node-name"):
- global nodes, section_errors
+ global nodes
if opt_legacy:
if not nodes:
node_query = NaElement("system-get-node-info-iter") # pylint:
disable=undefined-variable
@@ -687,7 +692,7 @@ def query_counters(what):
# Nothing to query..
return
- instances_to_query = NaElement("instance-uuids") # pylint:
disable=no-member
+ instances_to_query = NaElement("instance-uuids") # pylint:
disable=undefined-variable
for uuid in instance_uuids:
instances_to_query.child_add_string("instance-uuid", uuid)
counter_query.child_add(instances_to_query)
@@ -695,7 +700,7 @@ def query_counters(what):
return
# Query counters
- response = server.invoke_elem(counter_query) # pylint:
disable=undefined-variable
+ response = server.invoke_elem(counter_query) # pylint: disable=no-member
if response.results_status() == "failed":
section_errors.append("In counter %s: %s" % (what,
response.results_reason()))
else: