[lc_ldap] attrify ne reçoit plus de ldif, donc _create_entity doit changer
On en profite pour virer ldif_to_cldif, et pour donner une fonction .items à AttrsDict
This commit is contained in:
parent
a7d3af3ca1
commit
af109e8c61
2 changed files with 21 additions and 17 deletions
|
@ -103,6 +103,7 @@ class AttrsDict(dict) :
|
|||
super(AttrsDict, self).__init__(ldif)
|
||||
self._conn = conn
|
||||
self._parent = Parent
|
||||
self._iterator = None
|
||||
|
||||
def __getitem__(self, attr):
|
||||
values = super(AttrsDict, self).__getitem__(attr)
|
||||
|
@ -134,6 +135,9 @@ class AttrsDict(dict) :
|
|||
except KeyError:
|
||||
return default_value
|
||||
|
||||
def items(self):
|
||||
return [(key, self[key]) for key in self]
|
||||
|
||||
class Attr(object):
|
||||
"""Objet représentant un attribut.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue