Skip to content

Commit

Permalink
Fix for issue integralstor#450
Browse files Browse the repository at this point in the history
  • Loading branch information
purushotham-s committed May 29, 2019
1 parent 36873ff commit 4872b09
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions site-packages/integralstor/disks.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,14 +232,15 @@ def get_partitions(disk_name):
continue
if 'part' not in id1:
continue
d = {}
d['name'] = name
capacity, err = get_capacity(name)
if err:
raise Exception(err)
if capacity:
d["capacity"] = capacity
l.append(d)
if re.findall(r'%s\d+' % disk_name, name):
d = {}
d['name'] = name
capacity, err = get_capacity(name)
if err:
raise Exception(err)
if capacity:
d["capacity"] = capacity
l.append(d)
except Exception, e:
return None, "Error retrieving partitions : %s" % str(e)
else:
Expand Down

0 comments on commit 4872b09

Please sign in to comment.