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@hvornum.se>2021-03-29 16:59:09 +0200
committerAnton Hvornum <anton@hvornum.se>2021-03-29 16:59:09 +0200
commitf3907310e3fbbc07ad31f3558279cd73ba774472 (patch)
treefb1e74f4b5bad80ec2c47183ddedd0d711c1cae2 /archinstall/lib
parent5e9c973d42125bb809443670c1e30439e4b11b17 (diff)
Allowing individual partitions safety checks to rely on the parent blockdevice keep_partitions status.
Diffstat (limited to 'archinstall/lib')
-rw-r--r--archinstall/lib/disk.py3
1 files changed, 3 insertions, 0 deletions
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