From b64a67a24ea9b10d1978371ef4865972ee3ea266 Mon Sep 17 00:00:00 2001 From: Valentin Samir Date: Wed, 20 Nov 2013 16:28:12 +0100 Subject: [PATCH] [objets] methode display() pour afficher textuellement un objet --- objets.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/objets.py b/objets.py index 7051c2e..9575c55 100644 --- a/objets.py +++ b/objets.py @@ -53,6 +53,7 @@ import crans_utils import attributs import ldap_locks import variables +import printing ## import de /usr/scripts/ if not "/usr/scripts/" in sys.path: @@ -157,6 +158,10 @@ class CransLdapObject(object): nvals = [nldif[attr][vals.index(v)] for v in vals ] raise EnvironmentError("λv. str(Attr(v)) n'est peut-être pas une projection (ie non idempotente):", attr, nvals, vals) + + def display(self): + print printing.sprint(self) + def history_add(self, login, chain): """Ajoute une ligne à l'historique de l'objet. ###ATTENTION : C'est un kludge pour pouvoir continuer à faire "comme avant",