index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Daniel Girtler <blackrabbit256@gmail.com> | 2023-10-02 21:01:23 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-02 21:01:23 +1100 |
commit | 5c903df55fac449baae1e9cc23b04f6beeb55364 (patch) | |
tree | e9715ce5f82b57a34d9b0726973187730bca8cb0 /archinstall/lib/disk/device_model.py | |
parent | a095e393d8517e99f8832c447fd2ef0902cb6ca6 (diff) |
-rw-r--r-- | archinstall/lib/disk/device_model.py | 11 |
diff --git a/archinstall/lib/disk/device_model.py b/archinstall/lib/disk/device_model.py index 26169485..4ac53b0c 100644 --- a/archinstall/lib/disk/device_model.py +++ b/archinstall/lib/disk/device_model.py @@ -1111,12 +1111,12 @@ def _fetch_lsblk_info(dev_path: Optional[Union[Path, str]] = None, retry: int = for retry_attempt in range(retry): try: - result = SysCommand(f'lsblk --json -b -o+{lsblk_fields} {dev_path}') + result = SysCommand(f'lsblk --json -b -o+{lsblk_fields} {dev_path}').decode() break except SysCallError as err: # Get the output minus the message/info from lsblk if it returns a non-zero exit code. if err.worker: - err_str = err.worker.decode('UTF-8') + err_str = err.worker.decode() debug(f'Error calling lsblk: {err_str}') else: raise err @@ -1127,10 +1127,9 @@ def _fetch_lsblk_info(dev_path: Optional[Union[Path, str]] = None, retry: int = time.sleep(1) try: - if decoded := result.decode('utf-8'): - block_devices = json.loads(decoded) - blockdevices = block_devices['blockdevices'] - return [LsblkInfo.from_json(device) for device in blockdevices] + block_devices = json.loads(result) + blockdevices = block_devices['blockdevices'] + return [LsblkInfo.from_json(device) for device in blockdevices] except json.decoder.JSONDecodeError as err: error(f"Could not decode lsblk JSON: {result}") raise err |