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
2022-06-11 16:18:00 +02:00
parent 8abc0a22a8
commit 23d56bb952

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]"