mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-22 23:23:30 -06:00
Improve LDAPEntry.__repr__ for freshly created entries
Creating a LDAPEntry from dict does not set the raw entries, to display everything we need to combine the underlying data. https://fedorahosted.org/freeipa/ticket/4015
This commit is contained in:
parent
f20577ddc4
commit
76c7f24919
@ -719,7 +719,9 @@ class LDAPEntry(collections.MutableMapping):
|
||||
return self._orig
|
||||
|
||||
def __repr__(self):
|
||||
return '%s(%r, %r)' % (type(self).__name__, self._dn, self._raw)
|
||||
data = dict(self._raw)
|
||||
data.update((k, v) for k, v in self._nice.iteritems() if v is not None)
|
||||
return '%s(%r, %r)' % (type(self).__name__, self._dn, data)
|
||||
|
||||
def copy(self):
|
||||
return LDAPEntry(self)
|
||||
|
Loading…
Reference in New Issue
Block a user