Adding .encrypted logic after .format calls to correctly identify partitions as encrypted/not-encrypted. This after a .flush_cache has been called.

This commit is contained in:
Anton Hvornum 2021-03-29 18:11:46 +02:00
parent 8c8a441c26
commit a50aa59060
No known key found for this signature in database
GPG Key ID: F1234C5BA67C59DF
1 changed files with 2 additions and 2 deletions

View File

@ -322,10 +322,10 @@ class Partition():
else:
raise UnknownFilesystemFormat(f"Fileformat '{filesystem}' is not yet implemented.")
print('Checking if encrypted:', path)
print('Also checking:', self.real_device)
if get_filesystem_type(path) == 'crypto_LUKS' or get_filesystem_type(self.real_device) == 'crypto_LUKS':
self.encrypted = True
else:
self.encrypted = False
return True