Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-11-09 14:46:57 +0000
committerGitHub <noreply@github.com>2021-11-09 14:46:57 +0000
commitcd07dafaacec84954961fbbd8d6f4a2bc997410a (patch)
tree624036d71e637a44271907f439b3f30d50bd82b0
parentc9a4e38497c74919c2e5ccfaffd92ad72fee5b4b (diff)
parent75604a906d379a12f05e92b2826965cf4b8a8f6e (diff)
Merge pull request #704 from archlinux/torxed-fix-689
Fix #689 by adding a exception to filesystem.parted() on failure
-rw-r--r--archinstall/lib/disk/filesystem.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/archinstall/lib/disk/filesystem.py b/archinstall/lib/disk/filesystem.py
index 177c58f7..4d137163 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 <string>
: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.