Module: check_mk
Branch: master
Commit: 5575b1b69bf42e8100e13ba7b61f8f5fa994ac98
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5575b1b69bf42e…
Author: Moritz Kiemer <mo(a)mathias-kettner.de>
Date: Fri Jul 6 15:39:46 2018 +0200
kernel: don't change info argument
Change-Id: Icdecaa35f15e224a303bd7e0f1a1248b3ba45490
---
checks/kernel | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/checks/kernel b/checks/kernel
index f4f5e9c..4a32e54 100644
--- a/checks/kernel
+++ b/checks/kernel
@@ -114,10 +114,10 @@ def inventory_cpu_utilization(info):
def transform_cpu_info(element):
- if len(element) < 8:
- element += ['0', '0', '0', '0'] # needed for
Linux 2.4
-
- return [element[0]] + [int(x) for x in element[1:]]
+ transele = [element[0]] + map(int, element[1:])
+ if len(transele) < 8:
+ transele += [0] * 4 # needed for Linux 2.4
+ return transele
# Columns of cpu usage /proc/stat:
# - cpuX: number of CPU or only 'cpu' for aggregation