Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/disk/device_handler.py
diff options
context:
space:
mode:
Diffstat (limited to 'archinstall/lib/disk/device_handler.py')
-rw-r--r--archinstall/lib/disk/device_handler.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/archinstall/lib/disk/device_handler.py b/archinstall/lib/disk/device_handler.py
index 6927671d..baed2f6f 100644
--- a/archinstall/lib/disk/device_handler.py
+++ b/archinstall/lib/disk/device_handler.py
@@ -154,20 +154,19 @@ class DeviceHandler(object):
mountpoint = Path(common_prefix)
try:
- result = SysCommand(f'btrfs subvolume list {mountpoint}')
+ result = SysCommand(f'btrfs subvolume list {mountpoint}').decode()
except SysCallError as err:
debug(f'Failed to read btrfs subvolume information: {err}')
return subvol_infos
try:
- if decoded := result.decode('utf-8'):
- # ID 256 gen 16 top level 5 path @
- for line in decoded.splitlines():
- # expected output format:
- # ID 257 gen 8 top level 5 path @home
- name = Path(line.split(' ')[-1])
- sub_vol_mountpoint = lsblk_info.btrfs_subvol_info.get(name, None)
- subvol_infos.append(_BtrfsSubvolumeInfo(name, sub_vol_mountpoint))
+ # ID 256 gen 16 top level 5 path @
+ for line in result.splitlines():
+ # expected output format:
+ # ID 257 gen 8 top level 5 path @home
+ name = Path(line.split(' ')[-1])
+ sub_vol_mountpoint = lsblk_info.btrfs_subvol_info.get(name, None)
+ subvol_infos.append(_BtrfsSubvolumeInfo(name, sub_vol_mountpoint))
except json.decoder.JSONDecodeError as err:
error(f"Could not decode lsblk JSON: {result}")
raise err