From ff3687ab73ae5cb94a52b64e21caf815b59cb5d9 Mon Sep 17 00:00:00 2001 From: Adam Cecile Date: Mon, 12 Sep 2016 17:15:50 +0200 Subject: [PATCH] Disk information may be empty (no space after colon) --- wrapper-scripts/aacraid-status | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wrapper-scripts/aacraid-status b/wrapper-scripts/aacraid-status index 8e9e6e4..d1b2e9a 100755 --- a/wrapper-scripts/aacraid-status +++ b/wrapper-scripts/aacraid-status @@ -118,11 +118,11 @@ def returnDisksInfo(output,controllerid): diskid = re.split('\s:\s',line)[1].strip() diskid = re.sub('\(.*\)','',diskid) diskid = str(controllerid)+','+diskid - if re.match(r'^State\s+: .*$',line.strip()): + if re.match(r'^State\s+:.*$',line.strip()): state = line.split(':')[1].strip() - if re.match(r'^Vendor\s+: .*$',line.strip()): + if re.match(r'^Vendor\s+:.*$',line.strip()): vendor = line.split(':')[1].strip() - if re.match(r'^Model\s+: .*$',line.strip()): + if re.match(r'^Model\s+:.*$',line.strip()): model = line.split(':')[1].strip() if diskid != False and vendor != False and model != False and state != False: disks.append([diskid,state,vendor,model])