diff --git a/archinstall/lib/disk/device_model.py b/archinstall/lib/disk/device_model.py index 0eb40de017..6869b668a9 100644 --- a/archinstall/lib/disk/device_model.py +++ b/archinstall/lib/disk/device_model.py @@ -1345,7 +1345,7 @@ def json(self) -> Dict[str, Any]: 'fsavail': self.fsavail, 'fsuse_percentage': self.fsuse_percentage, 'type': self.type, - 'mountpoint': self.mountpoint, + 'mountpoint': str(self.mountpoint) if self.mountpoint else None, 'mountpoints': [str(m) for m in self.mountpoints], 'fsroots': [str(r) for r in self.fsroots], 'children': [c.json() for c in self.children] @@ -1393,6 +1393,8 @@ def from_json(cls, blockdevice: Dict[str, Any]) -> LsblkInfo: lsblk_info.children = [LsblkInfo.from_json(child) for child in blockdevice.get('children', [])] + lsblk_info.mountpoint = Path(lsblk_info.mountpoint) if lsblk_info.mountpoint else None + # sometimes lsblk returns 'mountpoints': [null] lsblk_info.mountpoints = [Path(mnt) for mnt in lsblk_info.mountpoints if mnt]