From fa2270a11b833928186727812a3a3f82d18ef5ce Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Sun, 7 Feb 2021 12:52:12 +0100 Subject: Created has_partitions() on BlockDevice's --- archinstall/lib/disk.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'archinstall/lib') diff --git a/archinstall/lib/disk.py b/archinstall/lib/disk.py index caf5c4e1..1d78d127 100644 --- a/archinstall/lib/disk.py +++ b/archinstall/lib/disk.py @@ -100,6 +100,9 @@ class BlockDevice(): all_partitions = self.partitions return [all_partitions[k] for k in all_partitions] + def has_partitions(self): + return len(self.partitions) + class Partition(): def __init__(self, path, part_id=None, size=-1, filesystem=None, mountpoint=None, encrypted=False): -- cgit v1.2.3-70-g09d2