From d3501e075471af7bf9678f17b9669b59d784fa6a Mon Sep 17 00:00:00 2001 From: Stephane Glondu Date: Thu, 19 Nov 2009 02:56:08 +0100 Subject: [PATCH] [ldap_crans] on se base sur le nom de machine pour attribuer les IPs du G darcs-hash:20091119015608-61eff-e8f4b626cca4f11ad5b19acf24e2f954543ae351.gz --- gestion/ldap_crans.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gestion/ldap_crans.py b/gestion/ldap_crans.py index 83289609..189d6125 100644 --- a/gestion/ldap_crans.py +++ b/gestion/ldap_crans.py @@ -2839,8 +2839,7 @@ Contactez nounou si la MAC est bien celle d'une carte.""", 3) elif not isinstance(proprio, Adherent) or proprio.adherentPayant(): proprio_subnet = 'adherents' try: - chbre = proprio.chbre() - if chbre and chbre[0] == 'G': + if self.nom().endswith("-g.crans.org"): proprio_subnet = 'adh-g' net = config.NETs[proprio_subnet] pool_ip = lister_ip_dispo(proprio_subnet)