[attributs] attrify renvoie Attr si l'attribut n'existe pas

This commit is contained in:
Antoine Durand-Gasselin 2010-10-17 16:28:32 +02:00
parent 45433c0432
commit 049f1b5460

View file

@ -51,7 +51,7 @@ def attrify(val, attr, ldif, conn, ctxt_check = True):
if isinstance(val, Attr):
return val
else:
return CRANS_ATTRIBUTES[attr](val, ldif, conn, ctxt_check)
return CRANS_ATTRIBUTES.get(attr, Attr)(val, ldif, conn, ctxt_check)
class Attr(object):
legend = "Human-readable description of attribute"