Skip to content
Snippets Groups Projects
Commit ceb9ec41 authored by Adriaan de Groot's avatar Adriaan de Groot
Browse files

[fstab] Avoid KeyError when no subvol is set (from dalto8)

parent c22bbea5
No related branches found
No related tags found
No related merge requests found
......@@ -237,7 +237,7 @@ class FstabGenerator(object):
return None
# If this is btrfs subvol a dedicated to a swapfile, use different options than a normal btrfs subvol
if filesystem == "btrfs" and partition["subvol"] == "/@swap":
if filesystem == "btrfs" and partition.get("subvol", None) == "/@swap":
options = self.get_mount_options("btrfs_swap", mount_point)
else:
options = self.get_mount_options(filesystem, mount_point)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment