Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/disk/helpers.py
diff options
context:
space:
mode:
authorDaniel <blackrabbit256@gmail.com>2022-04-22 21:23:38 +1000
committerGitHub <noreply@github.com>2022-04-22 13:23:38 +0200
commit2529d6a5f59eb6a16f95bf9d1117a6033c527df9 (patch)
treec115a489296404df3f578cc61208c8c8551127b0 /archinstall/lib/disk/helpers.py
parent0604ed45c3e270ef39b6c80af3787d4ee025c5a1 (diff)
Fix blockdevice key error (#1079)
Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
Diffstat (limited to 'archinstall/lib/disk/helpers.py')
-rw-r--r--archinstall/lib/disk/helpers.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/archinstall/lib/disk/helpers.py b/archinstall/lib/disk/helpers.py
index eae618fb..30c47666 100644
--- a/archinstall/lib/disk/helpers.py
+++ b/archinstall/lib/disk/helpers.py
@@ -221,10 +221,8 @@ def all_blockdevices(mappers=False, partitions=False, error=False) -> Dict[str,
device_path = f"/dev/{pathlib.Path(block_device).readlink().name}"
try:
information = blkid(f'blkid -p -o export {device_path}')
-
- # TODO: No idea why F841 is raised here:
- except SysCallError as error: # noqa: F841
- if error.exit_code in (512, 2):
+ except SysCallError as ex:
+ if ex.exit_code in (512, 2):
# Assume that it's a loop device, and try to get info on it
try:
information = get_loop_info(device_path)
@@ -234,7 +232,7 @@ def all_blockdevices(mappers=False, partitions=False, error=False) -> Dict[str,
except SysCallError:
information = get_blockdevice_uevent(pathlib.Path(block_device).readlink().name)
else:
- raise error
+ raise ex
information = enrich_blockdevice_information(information)