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