Attempting default value None for block device to partition.

This commit is contained in:
Anton Hvornum 2021-04-09 11:56:35 +02:00
parent eb7ed1126b
commit db7b3c8cca
No known key found for this signature in database
GPG Key ID: F1234C5BA67C59DF
1 changed files with 2 additions and 2 deletions

View File

@ -585,10 +585,10 @@ def get_partitions_in_use(mountpoint):
output = output.decode('UTF-8')
output = json.loads(output)
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', []):
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