on ne prend plus la date en compte mais la variable du fichier de config
darcs-hash:20041028134137-4ec08-8844d2fbf6a4c36fd62e8a94387281a962fbbdd1.gz
This commit is contained in:
parent
4173ac539e
commit
df97bde383
1 changed files with 5 additions and 4 deletions
|
@ -8,6 +8,7 @@ sys.path.append('/usr/scripts/gestion')
|
||||||
from gen_confs import gen_config
|
from gen_confs import gen_config
|
||||||
from ldap_crans import crans_ldap, ann_scol
|
from ldap_crans import crans_ldap, ann_scol
|
||||||
from time import localtime
|
from time import localtime
|
||||||
|
from config import bl_carte_et_actif
|
||||||
|
|
||||||
class squid(gen_config) :
|
class squid(gen_config) :
|
||||||
db = crans_ldap()
|
db = crans_ldap()
|
||||||
|
@ -67,13 +68,13 @@ class squid_carte(squid) :
|
||||||
chaine = "carteEtudiant!=%i"%ann_scol
|
chaine = "carteEtudiant!=%i"%ann_scol
|
||||||
recherche_bl = 0
|
recherche_bl = 0
|
||||||
|
|
||||||
if localtime()[1] in [9,10] :
|
if not bl_carte_et_actif :
|
||||||
# Inutile de relancer squid en septembre et octobre
|
# Inutile de relancer squid si la blacklist n'est pas activée
|
||||||
restart_cmd = ''
|
restart_cmd = ''
|
||||||
|
|
||||||
def _gen(self) :
|
def _gen(self) :
|
||||||
# Liste vide les mois de septembre et octobre
|
# Liste vide si la blacklist n'est pas activée
|
||||||
if localtime()[1] in [9,10] :
|
if not bl_carte_et_actif :
|
||||||
fic = self._open_conf(self.FICHIER)
|
fic = self._open_conf(self.FICHIER)
|
||||||
# on vide la blackliste
|
# on vide la blackliste
|
||||||
fic.close()
|
fic.close()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue