index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton@hvornum.se> | 2022-09-21 12:36:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-21 12:36:54 +0200 |
commit | 985ff449db6d681d852c4fa558d2a90ecf2a2bc3 (patch) | |
tree | 29a05b1ece0a0327091eb6f4f13b031f7cf9bfd9 /archinstall/lib/disk | |
parent | c1f21e7ca437e1e8a712ec9bed3bfdf3f4c893e5 (diff) |
-rw-r--r-- | archinstall/lib/disk/helpers.py | 7 |
diff --git a/archinstall/lib/disk/helpers.py b/archinstall/lib/disk/helpers.py index a148a5db..f19125f4 100644 --- a/archinstall/lib/disk/helpers.py +++ b/archinstall/lib/disk/helpers.py @@ -220,7 +220,12 @@ def all_blockdevices(mappers=False, partitions=False, error=False) -> Dict[str, # we'll iterate the /sys/class definitions and find the information # from there. for block_device in glob.glob("/sys/class/block/*"): - device_path = f"/dev/{pathlib.Path(block_device).readlink().name}" + device_path = pathlib.Path(f"/dev/{pathlib.Path(block_device).readlink().name}") + + if device_path.exists() is False: + log(f"Unknown device found by '/sys/class/block/*', ignoring: {device_path}", level=logging.WARNING, fg="yellow") + continue + try: information = blkid(f'blkid -p -o export {device_path}') except SysCallError as ex: |