mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
ipa-replica-manage: handle missing attributes
If nsds5replicalastupdateend is not yet present, ipa-replica-manage will backtrace as it tries to retrieve that attribute unconditionally. Gracefully handle that situation. Fixes: https://pagure.io/freeipa/issue/8605 Signed-off-by: François Cami <fcami@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com> Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
This commit is contained in:
parent
4b2c50ae62
commit
bc3906f9aa
@ -242,12 +242,18 @@ def list_replicas(realm, host, replica, dirman_passwd, verbose, nolookup=False):
|
||||
if initstatus is not None:
|
||||
print(" last init ended: %s" % str(
|
||||
ipautil.parse_generalized_time(
|
||||
entry.single_value['nsds5replicalastinitend'])))
|
||||
print(" last update status: %s" % entry.single_value.get(
|
||||
'nsds5replicalastupdatestatus'))
|
||||
print(" last update ended: %s" % str(
|
||||
ipautil.parse_generalized_time(
|
||||
entry.single_value['nsds5replicalastupdateend'])))
|
||||
entry.single_value['nsds5replicalastinitend']))
|
||||
)
|
||||
updatestatus = entry.single_value.get(
|
||||
'nsds5replicalastupdatestatus'
|
||||
)
|
||||
print(" last update status: %s" % updatestatus)
|
||||
if updatestatus is not None:
|
||||
print(" last update ended: %s" % str(
|
||||
ipautil.parse_generalized_time(
|
||||
entry.single_value['nsds5replicalastupdateend']
|
||||
))
|
||||
)
|
||||
|
||||
|
||||
def del_link(realm, replica1, replica2, dirman_passwd, force=False):
|
||||
|
Loading…
Reference in New Issue
Block a user