diff --git a/src/modules/fstab/main.py b/src/modules/fstab/main.py
index 42676145374b61cee9d376110f3f259770ec7337..6a771a24b34e1b4b85258c9a004534cc3b4cee3e 100644
--- a/src/modules/fstab/main.py
+++ b/src/modules/fstab/main.py
@@ -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)