From 92c4dedfb3855c76116892dffbb33e5a5d54b6b1 Mon Sep 17 00:00:00 2001 From: Valentin Samir Date: Tue, 14 May 2013 23:31:48 +0200 Subject: [PATCH] =?UTF-8?q?[attributs]=20On=20affiche=20le=20nom=20de=20l'?= =?UTF-8?q?attribut=20quand=20on=20l=C3=A8ve=20une=20SingleValueError?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- attributs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/attributs.py b/attributs.py index 06a981a..95f0114 100644 --- a/attributs.py +++ b/attributs.py @@ -124,7 +124,7 @@ class AttrsDict(dict): values = [ values ] if self._parent.mode in ['w', 'rw']: if CRANS_ATTRIBUTES.get(attr, Attr).singlevalue and len(values) > 1: - raise SingleValueError("L'attribut %s doit être monovalué.") + raise SingleValueError("L'attribut %s doit être monovalué." % CRANS_ATTRIBUTES.get(attr, Attr).__name__) super(AttrsDict, self).__setitem__(attr, values) else: super(AttrsDict, self).__setitem__(attr, values)