Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds@gmail.com>2021-11-11 14:51:57 +0000
committerAnton Hvornum <anton.feeds@gmail.com>2021-11-11 14:51:57 +0000
commitfd904ca787b5add3c2394f04eec1cc3914b64aff (patch)
tree335f8ee492a52170f6a28ea10f7841f5ee7faea2 /archinstall/lib
parente0782f234b20cdfbcbe411067b336979e7ac0216 (diff)
Improved partition.uuid handling of lsblk information
Diffstat (limited to 'archinstall/lib')
-rw-r--r--archinstall/lib/disk/partition.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/archinstall/lib/disk/partition.py b/archinstall/lib/disk/partition.py
index e9688965..b5c252a4 100644
--- a/archinstall/lib/disk/partition.py
+++ b/archinstall/lib/disk/partition.py
@@ -145,8 +145,11 @@ class Partition:
it doesn't seam to be able to detect md raid partitions.
"""
- lsblk = json.loads(SysCommand(f'lsblk -J -o+PARTUUID {self.path}').decode('UTF-8'))
- for partition in lsblk['blockdevices']:
+ partuuid_struct = SysCommand(f'lsblk -J -o+PARTUUID {self.path}')
+ if not partuuid_struct.exit_code == 0:
+ raise DiskError(f"Could not get PARTUUID for {self.path}: {partuuid_struct}")
+
+ for partition in json.loads(partuuid_struct.decode('UTF-8'))['blockdevices']:
return partition.get('partuuid', None)
return None