Module: check_mk
Branch: master
Commit: 3cdb5a8069702004cc2d542eb31c1b4559e5e360
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3cdb5a80697020…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Thu Jul 12 09:27:19 2018 +0200
Fixed a few unnecessary-lambda warnings.
Change-Id: I5b1c12e30a221a9383275e843b364eb82aa16eda
---
bin/mkbackup | 4 ++--
checks/ucs_bladecenter_if | 6 +++++-
cmk_base/modes/check_mk.py | 4 ++--
3 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/bin/mkbackup b/bin/mkbackup
index 65e1a85..0681dbd 100755
--- a/bin/mkbackup
+++ b/bin/mkbackup
@@ -1186,7 +1186,7 @@ def do_system_rw_backup(opts):
t.start()
# Process backup stream and write to destination file
- s = BackupStream(stream=pipein, is_alive=lambda: t.is_alive(),
+ s = BackupStream(stream=pipein, is_alive=t.is_alive,
key_ident=g_job_config["encrypt"])
for chunk in s.process():
backup_file.write(chunk)
@@ -1204,7 +1204,7 @@ def do_system_data_backup(opts):
t.start()
# Process backup stream and write to destination file
- s = BackupStream(stream=pipein, is_alive=lambda: t.is_alive(),
+ s = BackupStream(stream=pipein, is_alive=t.is_alive,
key_ident=g_job_config["encrypt"])
for chunk in s.process():
backup_file.write(chunk)
diff --git a/checks/ucs_bladecenter_if b/checks/ucs_bladecenter_if
index 6b3e87f..8166972 100644
--- a/checks/ucs_bladecenter_if
+++ b/checks/ucs_bladecenter_if
@@ -312,9 +312,13 @@ def parse_ucs_bladecenter_if(info):
return converted
+def inventory_ucs_bladecenter_if(info):
+ return inventory_if_common(info)
+
+
check_info["ucs_bladecenter_if"] = {
'parse_function' : parse_ucs_bladecenter_if,
- 'inventory_function' : lambda info: inventory_if_common(info),
+ 'inventory_function' : inventory_ucs_bladecenter_if,
'check_function' : check_if_common,
'service_description' : 'Interface %s',
'has_perfdata' : True,
diff --git a/cmk_base/modes/check_mk.py b/cmk_base/modes/check_mk.py
index 783a958..4bfd35d 100644
--- a/cmk_base/modes/check_mk.py
+++ b/cmk_base/modes/check_mk.py
@@ -833,7 +833,7 @@ modes.register(Mode(
long_option="extraoid",
argument=True,
argument_descr="A",
- argument_conv=lambda x: _extra_oids.append(x),
+ argument_conv=_extra_oids.append,
short_help="Walk also on this OID, in addition to mib-2 and "
"enterprises. You can specify this option multiple "
"times.",
@@ -842,7 +842,7 @@ modes.register(Mode(
long_option="oid",
argument=True,
argument_descr="A",
- argument_conv=lambda x: _oids.append(x),
+ argument_conv=_oids.append,
short_help="Walk on this OID instead of mib-2 and enterprises. "
"You can specify this option multiple times."
),