Patchs divers + mise jour de l'annuaire
darcs-hash:20040902051057-d1718-2e5bc8684bcff38b4e56318930da345f0b58f6b4.gz
This commit is contained in:
parent
1ec186d9dd
commit
a2411248dc
5 changed files with 128 additions and 76 deletions
|
@ -46,13 +46,13 @@ class switch(gen_config) :
|
|||
def gen_conf(self) :
|
||||
self.chbres.sort()
|
||||
for chbre in self.chbres :
|
||||
if chbre == '????' :
|
||||
continue
|
||||
bat = chbre[0].lower()
|
||||
a = self.db.search('chbre=%s' % chbre)['adherent']
|
||||
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()) :
|
||||
if (((ann_scol in adh.paiement()) or ((ann_scol-1) in adh.paiement and localtime()[1]==9)) and 'bloq' not in adh.blacklist_actif()) :
|
||||
# Il faut activer la prise
|
||||
anim('\tactivation chbre %s' % chbre)
|
||||
action = 'enable'
|
||||
|
@ -67,7 +67,7 @@ class switch(gen_config) :
|
|||
# Action sur le switch
|
||||
prise = chbre_prises[bat][chbre[1:].lower()]
|
||||
sw=hp(bat,int(prise[0]))
|
||||
r = sw.set_prise(int(prise[1:4]),'disable')
|
||||
r = sw.set_prise(int(prise[1:4]),action)
|
||||
sw.close()
|
||||
if not r :
|
||||
raise RuntimeError('Erreur de communiquation')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue