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