[fstab] Merge pull request #1901 from dalto8/fstabuuid

Fix empty UUID detection in fstab
This commit is contained in:
Adriaan de Groot 2022-03-14 11:02:15 +01:00 committed by GitHub
commit c35da331a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -265,7 +265,7 @@ class FstabGenerator(object):
if has_luks:
device = "/dev/mapper/" + partition["luksMapperName"]
elif partition["uuid"] is not None:
elif partition["uuid"]:
device = "UUID=" + partition["uuid"]
else:
device = partition["device"]