URL: https://github.com/freeipa/freeipa/pull/954
Author: stlaz
 Title: #954: py3 conncheck + service plugin fixes
Action: opened

PR body:
"""
commit 09942d0268f02ed15df5f7f3aad3220196c5a41c (HEAD -> py3-conncheck, 
private/py3-conncheck)
Author: Stanislav Laznicka <slazn...@redhat.com>
Date:   Wed Aug 2 16:05:16 2017 +0200

    conncheck: fix progression on failure
    
    traceback.format_exc() does not take exception object as an argument.
    This made Python 3 get stuck amid ipa-replica-conncheck, probably
    because it was waiting for a thread to finish.
    
    https://pagure.io/freeipa/issue/4985

commit fe820cbc1f3469150ab90af401b119d5d316f3ab
Author: Stanislav Laznicka <slazn...@redhat.com>
Date:   Wed Aug 2 15:59:39 2017 +0200

    kerberos: fix sorting Principal objects
    
    When service-find was issued under Python 3, the command fails
    because it tried to sort a list of Principal objects which was not
    possible.
    
    https://pagure.io/freeipa/issue/4985

"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/954/head:pr954
git checkout pr954
From fe820cbc1f3469150ab90af401b119d5d316f3ab Mon Sep 17 00:00:00 2001
From: Stanislav Laznicka <slazn...@redhat.com>
Date: Wed, 2 Aug 2017 15:59:39 +0200
Subject: [PATCH 1/2] kerberos: fix sorting Principal objects

When service-find was issued under Python 3, the command fails
because it tried to sort a list of Principal objects which was not
possible.

https://pagure.io/freeipa/issue/4985
---
 ipapython/kerberos.py | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/ipapython/kerberos.py b/ipapython/kerberos.py
index 9b02790bed..21f81de207 100644
--- a/ipapython/kerberos.py
+++ b/ipapython/kerberos.py
@@ -93,6 +93,18 @@ def __eq__(self, other):
     def __ne__(self, other):
         return not self.__eq__(other)
 
+    def __lt__(self, other):
+        return unicode(self) < unicode(other)
+
+    def __le__(self, other):
+        return self.__lt__(other) or self.__eq__(other)
+
+    def __gt__(self, other):
+        return not self.__le__(other)
+
+    def __ge__(self, other):
+        return self.__gt__(other) or self.__eq__(other)
+
     def __hash__(self):
         return hash(self.components + (self.realm,))
 

From 09942d0268f02ed15df5f7f3aad3220196c5a41c Mon Sep 17 00:00:00 2001
From: Stanislav Laznicka <slazn...@redhat.com>
Date: Wed, 2 Aug 2017 16:05:16 +0200
Subject: [PATCH 2/2] conncheck: fix progression on failure

traceback.format_exc() does not take exception object as an argument.
This made Python 3 get stuck amid ipa-replica-conncheck, probably
because it was waiting for a thread to finish.

https://pagure.io/freeipa/issue/4985
---
 install/tools/ipa-replica-conncheck | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install/tools/ipa-replica-conncheck b/install/tools/ipa-replica-conncheck
index 15e45e0a2f..b8a5dc8d24 100755
--- a/install/tools/ipa-replica-conncheck
+++ b/install/tools/ipa-replica-conncheck
@@ -348,7 +348,7 @@ class PortResponder(threading.Thread):
             logger.debug('%d %s: Started listening', port, proto)
         except socket.error as e:
             logger.warning('%d %s: Failed to bind', port, proto)
-            logger.debug("%s", traceback.format_exc(e))
+            logger.debug("%s", traceback.format_exc())
         else:
             self._sockets.append(sock)
 
_______________________________________________
FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org
To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org

Reply via email to