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