d4adbd
From 05a298f56485222583cb7dd4f6a3a4c5c77fc8cf Mon Sep 17 00:00:00 2001
d4adbd
From: Florence Blanc-Renaud <flo@redhat.com>
d4adbd
Date: Sun, 7 Aug 2022 12:44:47 +0200
d4adbd
Subject: [PATCH] check_repl_update: in progress is a boolean
d4adbd
d4adbd
With the fix for https://pagure.io/freeipa/issue/9171,
d4adbd
nsds5replicaUpdateInProgress is now handled as a boolean.
d4adbd
One remaining occurrence was still handling it as a string
d4adbd
and calling lower() on its value.
d4adbd
d4adbd
Replace with direct boolean comparison.
d4adbd
d4adbd
Fixes: https://pagure.io/freeipa/issue/9218
d4adbd
Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
d4adbd
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
d4adbd
---
d4adbd
 ipaserver/install/replication.py | 2 +-
d4adbd
 1 file changed, 1 insertion(+), 1 deletion(-)
d4adbd
d4adbd
diff --git a/ipaserver/install/replication.py b/ipaserver/install/replication.py
d4adbd
index 16be3760c..9d9aa1c4b 100644
d4adbd
--- a/ipaserver/install/replication.py
d4adbd
+++ b/ipaserver/install/replication.py
d4adbd
@@ -1152,7 +1152,7 @@ class ReplicationManager:
d4adbd
             except (ValueError, TypeError, KeyError):
d4adbd
                 end = 0
d4adbd
             # incremental update is done if inprogress is false and end >= start
d4adbd
-            done = inprogress and inprogress.lower() == 'false' and start <= end
d4adbd
+            done = inprogress is not None and not inprogress and start <= end
d4adbd
             logger.info("Replication Update in progress: %s: status: %s: "
d4adbd
                         "start: %d: end: %d",
d4adbd
                         inprogress, status, start, end)
d4adbd
-- 
d4adbd
2.37.2
d4adbd