From c0898c308b2f7b252016d04715ca75a9429c55b9 Mon Sep 17 00:00:00 2001
From: Kevin Kofler <kevin.kofler@chello.at>
Date: Fri, 21 Oct 2016 00:19:22 +0200
Subject: [PATCH] [grubcfg] Compare integers to integers, not strings.

target_env_call returns an integer, so do not compare its result to the
string "0".
---
 src/modules/grubcfg/main.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/modules/grubcfg/main.py b/src/modules/grubcfg/main.py
index 1cbc4a4cd1..1aea140d70 100644
--- a/src/modules/grubcfg/main.py
+++ b/src/modules/grubcfg/main.py
@@ -45,7 +45,7 @@ def modify_grub_default(partitions, root_mount_point, distributor):
 
     cryptdevice_params = []
 
-    if dracut_bin == "0":
+    if dracut_bin == 0:
         for partition in partitions:
             if partition["fs"] == "linuxswap":
                 swap_uuid = partition["uuid"]
@@ -78,7 +78,7 @@ def modify_grub_default(partitions, root_mount_point, distributor):
     if swap_uuid:
         kernel_params.append("resume=UUID={!s}".format(swap_uuid))
 
-    if dracut_bin == "0" and swap_outer_uuid:
+    if dracut_bin == 0 and swap_outer_uuid:
         kernel_params.append("rd.luks.uuid={!s}".format(swap_outer_uuid))
 
     distributor_line = "GRUB_DISTRIBUTOR='{!s}'".format(distributor_replace)
-- 
GitLab