ipa-replica-install: nsds5replicaUpdateInProgress is a Boolean

nsds5replicaUpdateInProgress is defined in LDAP schema as a boolean.
Now that IPA API is able to properly map booleans to the python
bool type, this attribute is not a string any more and
comparisons can be done directly based on its real type.

The code in ipa-replica-install was reading nsds5replicaUpdateInProgress
and calling value.tolower() == 'true' but should now use
value == True instead.

Related: https://pagure.io/freeipa/issue/9171
Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Florence Blanc-Renaud committed 2022-06-13 09:07:38 +02:00
1 parent 60d092f002
commit 8a4ad65936
1 file changed
+1 -1
+1 -1
View File
@@ -1096,7 +1096,7 @@ class ReplicationManager:
elif status.find("Total update succeeded") > -1:
print("\nUpdate succeeded")
done = True
elif inprogress.lower() == 'true':
elif inprogress:
print("\nUpdate in progress yet not in progress")
else:
print("\n[%s] reports: Update failed! Status: [%s]"