[lc_ldap] ob.__class__.__name__ ne retournait pas ce qu'on m'avait dit qu'il retournait...

This commit is contained in:
Pierre-Elliott Bécue 2013-03-04 07:29:49 +01:00
parent 23ebf9de76
commit 174bd87524

View file

@ -496,10 +496,10 @@ class CransLdapObject(object):
def _get_fields(self): # def _get_fields(self):
"""Renvoie la liste des champs LDAP de l'objet""" # """Renvoie la liste des champs LDAP de l'objet"""
return self.attribs # return self.attribs
fields = property(_get_fields) # attribs = property(_get_fields)
def history_add(self, login, chain): def history_add(self, login, chain):
"""Ajoute une ligne à l'historique de l'objet. """Ajoute une ligne à l'historique de l'objet.
@ -588,7 +588,7 @@ class CransLdapObject(object):
def has_key(self, attr): def has_key(self, attr):
"""Est-ce que notre objet a l'attribut en question ?""" """Est-ce que notre objet a l'attribut en question ?"""
return attr in [attrib.__class__.__name__ for attrib in self.attribs] return attr in [attrib.__name__ for attrib in self.attribs]
def __setitem__(self, attr, values): def __setitem__(self, attr, values):
if self.mode not in ['w', 'rw']: if self.mode not in ['w', 'rw']: