From bb76b28f7cb80f7e9c677066b3b27d9fab938f58 Mon Sep 17 00:00:00 2001 From: Nicolas Dandrimont Date: Sun, 30 Aug 2009 15:31:46 +0200 Subject: [PATCH] =?UTF-8?q?[ldap=5Fcrans]=20Support=20des=20switchs=20s?= =?UTF-8?q?=C3=A9rie=202610=20(deux=20uplinks=20de=20plus=20que=202600)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ignore-this: 7c35bb8c483f7c02d181fb07877d2531 darcs-hash:20090830133146-ffbb2-e2a9c44f5a41205ad9d6c1554ca7c8814719fd63.gz --- gestion/ldap_crans.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gestion/ldap_crans.py b/gestion/ldap_crans.py index 412a00b9..42bd7d2a 100644 --- a/gestion/ldap_crans.py +++ b/gestion/ldap_crans.py @@ -3134,8 +3134,10 @@ class MachineCrans(Machine): except: raise ValueError(u'Le nombre de prises doit ĂȘtre un entier') - if new not in [24, 26, 50]: - raise ValueError(u'Le nombre de prises doit ĂȘtre 26 ou 50') + vals = [24, 26, 28, 50, 52] + if new not in vals: + raise ValueError('Le nombre de prises doit etre %s ou %d' % ( + ', '.join(str(val) for val in vals[:-1]), vals[-1])) self._set('nombrePrises', [str(new)]) return new