Skip to content
Permalink
Browse files

diskstat: handle output 'No Devices Found' - avoiding exception

  • Loading branch information
MathiasKettner committed Jun 7, 2012
1 parent c964983 commit 75b83c34b060a160b86f8a0bba21a92dfeebe58b
Showing with 13 additions and 6 deletions.
  1. +4 −0 ChangeLog
  2. +9 −6 checks/diskstat
@@ -1,3 +1,7 @@
1.2.0p1:
Checks & Agents:
* diskstat: handle output 'No Devices Found' - avoiding exception

1.2.0:
Setup:
* FIX: fix building of RPM packages (due to mk_mysql, mk_postgres)
@@ -90,12 +90,15 @@ def diskstat_parse_info(info):
if phase == 'info':
info_plain.append(line)
elif phase == 'dmsetup_info':
majmin = tuple(map(int, line[1].split(':')))
if len(line) == 4:
name = "LVM %s" % line[0]
else:
name = "DM %s" % line[0]
nameinfo[majmin] = name
try:
majmin = tuple(map(int, line[1].split(':')))
if len(line) == 4:
name = "LVM %s" % line[0]
else:
name = "DM %s" % line[0]
nameinfo[majmin] = name
except:
pass # ignore such crap as "No Devices Found"
elif phase == 'vx_dsk':
maj = int(line[0], 16)
min = int(line[1], 16)

0 comments on commit 75b83c3

Please sign in to comment.
You can’t perform that action at this time.