Skip to content

Commit

Permalink
Remove superfluous try in get_btrfs_info() (#3010)
Browse files Browse the repository at this point in the history
  • Loading branch information
codefiles authored Dec 7, 2024
1 parent 1d278f8 commit ae3b0f8
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions archinstall/lib/disk/device_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,17 +239,13 @@ def get_btrfs_info(
# to the corresponding mountpoints
btrfs_subvol_info = dict(zip(lsblk_info.fsroots, lsblk_info.mountpoints))

try:
# 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 = 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
# 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 = btrfs_subvol_info.get(name, None)
subvol_infos.append(_BtrfsSubvolumeInfo(name, sub_vol_mountpoint))

if not lsblk_info.mountpoint:
self.umount(dev_path)
Expand Down

0 comments on commit ae3b0f8

Please sign in to comment.