diff --git a/gestion/gen_confs/switchs.py b/gestion/gen_confs/switchs.py index 523d1378..16683dc8 100755 --- a/gestion/gen_confs/switchs.py +++ b/gestion/gen_confs/switchs.py @@ -41,12 +41,12 @@ hostname "%(switch)s" snmp-server contact "root@crans.org" snmp-server location "Batiment %(bat)s" ;A faire à la main -;snmpv3 enable -;snmpv3 restricted-access +snmpv3 enable +snmpv3 restricted-access ;snmpv3 user "initial" -;snmpv3 user "crans" -;snmpv3 group ManagerPriv user "crans" sec-model ver3 -;snmp-server community "public" Operator +snmpv3 user "crans" +snmpv3 group ManagerPriv user "crans" sec-model ver3 +snmp-server community "public" Operator ;-------------------------------------------------------- Réglage heure/date time timezone 60 time daylight-time-rule Western-Europe @@ -129,10 +129,10 @@ exit def configure_chbre(self,chbre) : """ Recontigure la chambre fournie chambre """ bat = chbre[0].lower() - a = self.db.search('chbre=%s' % chbre)['adherent'] + a = self.db.search('chbre=%s' % chbre) action = '' - for adh in a : - if (((ann_scol in adh.paiement()) or ((ann_scol-1) in adh.paiement() and localtime()[1]==9)) and 'bloq' not in adh.blacklist_actif()) : + for proprio in a['adherent'] + a['club'] : + if (((ann_scol in proprio.paiement()) or ((ann_scol-1) in proprio.paiement() and localtime()[1]==9)) and 'bloq' not in proprio.blacklist_actif()) : # Il faut activer la prise anim('\tactivation chbre %s' % chbre) action = 'enable'