Experimenting with cache, carrying over .allow_formatting

This commit is contained in:
Anton Hvornum 2021-03-29 17:34:13 +02:00
parent a0980afff1
commit 512f0327f0
No known key found for this signature in database
GPG Key ID: F1234C5BA67C59DF
1 changed files with 2 additions and 1 deletions

View File

@ -142,8 +142,9 @@ class BlockDevice():
if partition in self.part_cache:
if self.part_cache[partition].size == old_partitions[partition].size and \
self.part_cache[partition].filesystem == old_partitions[partition].filesystem:
print('Carrying over', self.part_cache[partition].target_mountpoint)
print('Carrying over', self.part_cache[partition].target_mountpoint, self.part_cache[partition].allow_formatting)
self.part_cache[partition].target_mountpoint = old_partitions[partition].target_mountpoint
self.part_cache[partition].allow_formatting = old_partitions[partition].allow_formatting
class Partition():
def __init__(self, path :str, block_device :BlockDevice, part_id=None, size=-1, filesystem=None, mountpoint=None, encrypted=False, autodetect_filesystem=True):