Hello Honza,
This is a simple enough patch, but I'd like you to check if it's consistent with your vision of the framework.

--
PetrĀ³
From da6977de621e02ccff73f672a307aaac56df7778 Mon Sep 17 00:00:00 2001
From: Petr Viktorin <pvikt...@redhat.com>
Date: Wed, 6 Nov 2013 12:40:02 +0100
Subject: [PATCH] Improve LDAPEntry.__repr__ for freshly created entries

Creating a LDAPEntry from dict does not set the raw entries,
to make sure they are set we need to use the public accessor
rather tan _raw.

https://fedorahosted.org/freeipa/ticket/4015
---
 ipapython/ipaldap.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ipapython/ipaldap.py b/ipapython/ipaldap.py
index 339da25ce3c17453e84a667daf46ad6e498e3bdf..790147f36027dcf5da5a06a23f6e1f05bda5933a 100644
--- a/ipapython/ipaldap.py
+++ b/ipapython/ipaldap.py
@@ -719,7 +719,7 @@ def orig_data(self):
         return self._orig
 
     def __repr__(self):
-        return '%s(%r, %r)' % (type(self).__name__, self._dn, self._raw)
+        return '%s(%r, %r)' % (type(self).__name__, self._dn, dict(self.raw))
 
     def copy(self):
         return LDAPEntry(self)
-- 
1.8.3.1

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to