Envoi de mail que si dans bon batiment.
darcs-hash:20050422123506-41617-417079cb91e826efe039220dcbff6a37d7cb8780.gz
This commit is contained in:
parent
984fa8bc1d
commit
0084764d78
2 changed files with 10 additions and 3 deletions
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
# Liste des bâtiments avec switch manageables
|
# Liste des bâtiments avec switch manageables
|
||||||
bat_switchs = [ 'a', 'b', 'c' , 'g' , 'h' , 'i' , 'j' ]
|
bat_switchs = [ 'a', 'b', 'c' , 'g' , 'h' , 'i' , 'j' ]
|
||||||
|
bat_manuels = [ 'm', 'p' ]
|
||||||
|
|
||||||
aide={
|
aide={
|
||||||
'a' : "Chambres 603g et d sur même prise (câble d mort). Chambre 608d branchée sur le local photocopieuse",
|
'a' : "Chambres 603g et d sur même prise (câble d mort). Chambre 608d branchée sur le local photocopieuse",
|
||||||
|
|
|
@ -154,7 +154,7 @@ exit
|
||||||
if bat in bat_switchs :
|
if bat in bat_switchs :
|
||||||
prise = sw_chbre(chbre)
|
prise = sw_chbre(chbre)
|
||||||
prise.reconfigure() # Vitesse et nom (juste au cas ou ca aurait changé)
|
prise.reconfigure() # Vitesse et nom (juste au cas ou ca aurait changé)
|
||||||
else :
|
elif bat in bat_manuels :
|
||||||
class prise_non_manageable :
|
class prise_non_manageable :
|
||||||
def __init__(self,chbre) :
|
def __init__(self,chbre) :
|
||||||
self.chbre = chbre
|
self.chbre = chbre
|
||||||
|
@ -174,8 +174,14 @@ exit
|
||||||
def enable(self) :
|
def enable(self) :
|
||||||
self.__mail("Chambre %s à brancher." % self.chbre)
|
self.__mail("Chambre %s à brancher." % self.chbre)
|
||||||
|
|
||||||
prise=prise_non_manageable(chbre)
|
prise=prise_non_manageable(chbre)
|
||||||
|
|
||||||
|
else :
|
||||||
|
# Rien a faire
|
||||||
|
print OK
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
a = self.db.search('chbre=%s&paiement=ok' % chbre)
|
a = self.db.search('chbre=%s&paiement=ok' % chbre)
|
||||||
a = a['adherent'] + a['club']
|
a = a['adherent'] + a['club']
|
||||||
if a and 'bloq' not in a[0].blacklist_actif() :
|
if a and 'bloq' not in a[0].blacklist_actif() :
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue