Use constructor instead of a loop
This commit is contained in:
parent
26b1c349d3
commit
741c1c5d1e
@ -91,10 +91,7 @@ def modify_grub_default(partitions, root_mount_point, distributor):
|
||||
swap_outer_mappername = None
|
||||
no_save_default = False
|
||||
unencrypted_separate_boot = False
|
||||
|
||||
for partition in partitions:
|
||||
if (partition["mountPoint"] == "/boot"
|
||||
and "luksMapperName" not in partition):
|
||||
if any(partition["mountPoint"] == "/boot" and "luksMapperName" not in partition for partition in partitions):
|
||||
unencrypted_separate_boot = True
|
||||
|
||||
for partition in partitions:
|
||||
|
@ -21,10 +21,6 @@ _ = gettext.translation("calamares-python",
|
||||
fallback=True).gettext
|
||||
|
||||
|
||||
for partition in partitions:
|
||||
if (partition["mountPoint"] == "/boot"
|
||||
and "luksMapperName" not in partition):
|
||||
unencrypted_separate_boot = True
|
||||
|
||||
def pretty_name():
|
||||
return _("Configuring OpenRC dmcrypt service.")
|
||||
@ -34,6 +30,8 @@ def write_dmcrypt_conf(partitions, root_mount_point, dmcrypt_conf_path):
|
||||
crypto_target = ""
|
||||
crypto_source = ""
|
||||
unencrypted_separate_boot = False
|
||||
if any(partition["mountPoint"] == "/boot" and "luksMapperName" not in partition for partition in partitions):
|
||||
unencrypted_separate_boot = True
|
||||
|
||||
for partition in partitions:
|
||||
has_luks = "luksMapperName" in partition
|
||||
|
Loading…
Reference in New Issue
Block a user