From f3907310e3fbbc07ad31f3558279cd73ba774472 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Mon, 29 Mar 2021 16:59:09 +0200 Subject: Allowing individual partitions safety checks to rely on the parent blockdevice keep_partitions status. --- archinstall/lib/disk.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'archinstall') diff --git a/archinstall/lib/disk.py b/archinstall/lib/disk.py index 518c1503..d6d28935 100644 --- a/archinstall/lib/disk.py +++ b/archinstall/lib/disk.py @@ -237,6 +237,9 @@ class Partition(): return True if files > 0 else False def safe_to_format(self): + if self.block_device and self.block_device.keep_partitions is True: + return True + if self.allow_formatting is False: log(f"Partition {self} is not marked for formatting.", level=LOG_LEVELS.Debug) return False -- cgit v1.2.3-70-g09d2