Proper check for luksMapperName key.

This commit is contained in:
Teo Mrnjavac 2016-05-05 12:49:58 +02:00
parent b792ea0216
commit e1ee6e181a
3 changed files with 4 additions and 3 deletions

View file

@ -100,7 +100,7 @@ def create_systemd_boot_conf(uuid, conf_path, kernel_line):
if partition["fs"] == "linuxswap":
swap_uuid = partition["uuid"]
if partition["mountPoint"] == "/" and partition["luksMapperName"]:
if partition["mountPoint"] == "/" and "luksMapperName" in partition:
cryptdevice_params = [
"cryptdevice=UUID={!s}:{!s}".format(partition["uuid"],
partition["luksMapperName"]),