Module: check_mk
Branch: master
Commit: 18d2b31e45d1efa1747f324c0e2899121ee6eff1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=18d2b31e45d1ef…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Mon Jul 24 14:30:58 2017 +0200
Minor code cleanup
Change-Id: I7af9e93bfa1d8302520366f051b2fea791a72d2d
---
checks/multipath | 31 +++++++++++++++----------------
1 file changed, 15 insertions(+), 16 deletions(-)
diff --git a/checks/multipath b/checks/multipath
index fe40d85..0f472c4 100644
--- a/checks/multipath
+++ b/checks/multipath
@@ -246,22 +246,21 @@ def parse_multipath(info):
# Proceed with next line after init
continue
- else:
- if uuid != None:
- # Handle special syntax | |- 2:0:0:1 sda ...
- if line[0] == '|':
- line = line[1:]
- if reg_prio.search(l):
- group['state'] = "".join(line[3:])
- elif len(line) >= 4 and reg_lun.match(line[1]):
- luninfo = "%s(%s)" % (line[1], line[2])
- lun_info.append(luninfo)
- state = line[4]
- if not "active" in state:
- broken_paths.append(luninfo)
- numpaths += 1
- group['numpaths'] = numpaths
- paths_info.append(line[2])
+ elif uuid != None:
+ # Handle special syntax | |- 2:0:0:1 sda ...
+ if line[0] == '|':
+ line = line[1:]
+ if reg_prio.search(l):
+ group['state'] = "".join(line[3:])
+ elif len(line) >= 4 and reg_lun.match(line[1]):
+ luninfo = "%s(%s)" % (line[1], line[2])
+ lun_info.append(luninfo)
+ state = line[4]
+ if not "active" in state:
+ broken_paths.append(luninfo)
+ numpaths += 1
+ group['numpaths'] = numpaths
+ paths_info.append(line[2])
return groups
# Get list of UUIDs of all multipath devices