From 75604a906d379a12f05e92b2826965cf4b8a8f6e Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Tue, 9 Nov 2021 14:11:22 +0000 Subject: [PATCH] Adding a exception to filesystem.parted() if it fails. We can't let these go by unoticed --- archinstall/lib/disk/filesystem.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/archinstall/lib/disk/filesystem.py b/archinstall/lib/disk/filesystem.py index 177c58f..4d13716 100644 --- a/archinstall/lib/disk/filesystem.py +++ b/archinstall/lib/disk/filesystem.py @@ -143,7 +143,10 @@ class Filesystem: :param string: A raw string passed to /usr/bin/parted -s :type string: str """ - return self.raw_parted(string).exit_code == 0 + if (parted_handle := self.raw_parted(string)).exit_code == 0: + return True + else: + raise DiskError(f"Parted failed to add a partition: {parted_handle}") def use_entire_disk(self, root_filesystem_type='ext4') -> Partition: # TODO: Implement this with declarative profiles instead.