Added missing check of disk encryption is None or not.

This commit is contained in:
Anton Hvornum 2023-02-23 07:44:35 +01:00
parent f0f4e4f1c7
commit 6137b25078
No known key found for this signature in database
GPG Key ID: F1234C5BA67C59DF
1 changed files with 1 additions and 1 deletions

View File

@ -113,7 +113,7 @@ class Filesystem:
format_options = partition.get('options',[]) + partition.get('filesystem',{}).get('format_options',[])
disk_encryption: DiskEncryption = storage['arguments'].get('disk_encryption')
if partition in disk_encryption.partitions:
if disk_encryption and partition in disk_encryption.partitions:
if not partition['device_instance']:
raise DiskError(f"Internal error caused us to loose the partition. Please report this issue upstream!")