From 049f1b54604b9f4eedebda4e2a96982f5f9d0ba5 Mon Sep 17 00:00:00 2001 From: Antoine Durand-Gasselin Date: Sun, 17 Oct 2010 16:28:32 +0200 Subject: [PATCH] [attributs] attrify renvoie Attr si l'attribut n'existe pas --- attributs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/attributs.py b/attributs.py index e79cce1..746e5e9 100644 --- a/attributs.py +++ b/attributs.py @@ -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"