URL: https://github.com/freeipa/freeipa/pull/2415
Author: germanparente
 Title: #2415: diffs for freeipa 7716
Action: opened

PR body:
"""
this could be a potential diff candidate for 
https://pagure.io/freeipa/issue/7716
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/2415/head:pr2415
git checkout pr2415
From 911d578e37fe953a4e585c5a734f719e3e55bd99 Mon Sep 17 00:00:00 2001
From: German Parente <gpare...@redhat.com>
Date: Mon, 1 Oct 2018 17:39:20 +0200
Subject: [PATCH] diffs for freeipa 7716

---
 install/tools/ipa-csreplica-manage.in | 10 +++++-----
 install/tools/ipa-replica-manage.in   |  8 ++++----
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/install/tools/ipa-csreplica-manage.in b/install/tools/ipa-csreplica-manage.in
index b9ad3775e7..6988810464 100644
--- a/install/tools/ipa-csreplica-manage.in
+++ b/install/tools/ipa-csreplica-manage.in
@@ -135,11 +135,11 @@ def list_replicas(realm, host, replica, dirman_passwd, verbose):
         print('%s' % entry.single_value.get('nsds5replicahost'))
 
         if verbose:
-            print("  last init status: %s" % entry.single_value.get(
-                'nsds5replicalastinitstatus'))
-            print("  last init ended: %s" % str(
-                ipautil.parse_generalized_time(
-                    entry.single_value['nsds5replicalastinitend'])))
+            initstatus = entry.single_value.get('nsds5replicalastinitstatus')
+            if initstatus is not None:
+                 print("  last init status: %s" % initstatus)
+                 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(
diff --git a/install/tools/ipa-replica-manage.in b/install/tools/ipa-replica-manage.in
index d69f5ef393..8011b3d364 100644
--- a/install/tools/ipa-replica-manage.in
+++ b/install/tools/ipa-replica-manage.in
@@ -240,10 +240,10 @@ def list_replicas(realm, host, replica, dirman_passwd, verbose, nolookup=False):
         print('%s: %s' % (entry.single_value.get('nsds5replicahost'), ent_type))
 
         if verbose:
-            print("  last init status: %s" % entry.single_value.get(
-                'nsds5replicalastinitstatus'))
-            print("  last init ended: %s" % str(ipautil.parse_generalized_time(
-                entry.single_value['nsds5replicalastinitend'])))
+            initstatus = entry.single_value.get('nsds5replicalastinitstatus')
+            if initstatus is not None:
+                 print("  last init status: %s" % initstatus)
+                 print("  last init ended: %s" % str(ipautil.parse_generalized_time(
             print("  last update status: %s" % entry.single_value.get(
                 'nsds5replicalastupdatestatus'))
             print("  last update ended: %s" % str(
_______________________________________________
FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org
To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedorahosted.org/archives/list/freeipa-devel@lists.fedorahosted.org

Reply via email to