Module: check_mk
Branch: master
Commit: 5b3458b1381f0f7f8d54d1d803ad2440c2f14a81
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5b3458b1381f0f…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Sep 29 11:29:34 2015 +0200
Trivial code cleanup in pandacom
---
checks/pandacom_psu | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/checks/pandacom_psu b/checks/pandacom_psu
index 0263b87..43c5414 100644
--- a/checks/pandacom_psu
+++ b/checks/pandacom_psu
@@ -59,11 +59,15 @@ def parse_pandacom_psu(info):
"3" : (0, "pass"),
}
parsed = {}
- for fan_nr, index_type, index_state in [("1", 5, 2), ("2", 6, 3),
("3", 10, 11)]:
- if info[index_state][0] != "0":
- parsed[fan_nr] = {
- "type" : map_psu_type[info[index_type][0]],
- "state" : map_psu_state[info[index_state][0]],
+ for psu_nr, type_index, state_index in [
+ ("1", 5, 2),
+ ("2", 6, 3),
+ ("3", 10, 11),
+ ]:
+ if info[state_index][0] != "0":
+ parsed[psu_nr] = {
+ "type" : map_psu_type[info[type_index][0]],
+ "state" : map_psu_state[info[state_index][0]],
}
return parsed