Fix mount_volumes() under Linux

This commit is contained in:
2Shirt 2022-09-04 16:57:55 -07:00
parent 5e1cc683fe
commit d36589751e
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -206,8 +206,8 @@ def mount_volumes(device_path=None, read_write=False, scan_corestorage=False):
json_data = get_json_from_command(cmd)
# Build list of volumes
for dev in _get_volumes(json_data.get('blockdevices', [{}])[0]):
volumes.append(dev)
for dev in json_data.get('blockdevices', [{}]):
volumes.extend(_get_volumes(dev))
if dev.get('parttype', '') == UUID_CORESTORAGE:
containers.append(dev['name'])