Attempting default value None for block device to partition.
This commit is contained in:
parent
eb7ed1126b
commit
db7b3c8cca
|
|
@ -585,10 +585,10 @@ def get_partitions_in_use(mountpoint):
|
||||||
output = output.decode('UTF-8')
|
output = output.decode('UTF-8')
|
||||||
output = json.loads(output)
|
output = json.loads(output)
|
||||||
for target in output.get('filesystems', []):
|
for target in output.get('filesystems', []):
|
||||||
mounts.append(Partition(target['source'], filesystem=target.get('fstype', None), mountpoint=target['target']))
|
mounts.append(Partition(target['source'], None, filesystem=target.get('fstype', None), mountpoint=target['target']))
|
||||||
|
|
||||||
for child in target.get('children', []):
|
for child in target.get('children', []):
|
||||||
mounts.append(Partition(child['source'], filesystem=child.get('fstype', None), mountpoint=child['target']))
|
mounts.append(Partition(child['source'], None, filesystem=child.get('fstype', None), mountpoint=child['target']))
|
||||||
|
|
||||||
return mounts
|
return mounts
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue