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