Detabification
darcs-hash:20051005115406-d1718-c783b5e6e80382dd4de74e593beba81e1811487f.gz
This commit is contained in:
parent
8746085e35
commit
a6e0665dff
1 changed files with 137 additions and 130 deletions
|
@ -179,16 +179,16 @@ def format_mac(mac) :
|
||||||
class service :
|
class service :
|
||||||
""" Défini un service à redémarrer """
|
""" Défini un service à redémarrer """
|
||||||
def __init__(self,nom,args=[],start=[]) :
|
def __init__(self,nom,args=[],start=[]) :
|
||||||
""" nom du service
|
""" nom du service
|
||||||
liste des arguments
|
liste des arguments
|
||||||
liste d'horaires de démarages """
|
liste d'horaires de démarages """
|
||||||
self.nom=nom
|
self.nom=nom
|
||||||
self.args=args
|
self.args=args
|
||||||
self.start=map(int,start)
|
self.start=map(int,start)
|
||||||
|
|
||||||
def __str__(self) :
|
def __str__(self) :
|
||||||
return "%s(%s) à partir du %s" % (self.nom, \
|
return "%s(%s) à partir du %s" % (self.nom, \
|
||||||
','.join(self.args), \
|
','.join(self.args), \
|
||||||
' et '.join(map(lambda t:time.strftime(date_format,time.gmtime(t)), self.start)))
|
' et '.join(map(lambda t:time.strftime(date_format,time.gmtime(t)), self.start)))
|
||||||
|
|
||||||
class crans_ldap :
|
class crans_ldap :
|
||||||
|
@ -228,9 +228,9 @@ class crans_ldap :
|
||||||
|
|
||||||
def __del__(self) :
|
def __del__(self) :
|
||||||
# Destruction des locks résiduels
|
# Destruction des locks résiduels
|
||||||
if hasattr(self,'_locks') :
|
if hasattr(self,'_locks') :
|
||||||
for lock in self._locks :
|
for lock in self._locks :
|
||||||
self.remove_lock(lock)
|
self.remove_lock(lock)
|
||||||
|
|
||||||
def connect(self):
|
def connect(self):
|
||||||
""" Initialisation des connexion vers le serveur LDAP """
|
""" Initialisation des connexion vers le serveur LDAP """
|
||||||
|
@ -353,6 +353,13 @@ class crans_ldap :
|
||||||
|
|
||||||
try :
|
try :
|
||||||
self.conn.add_s(lock_dn,modlist)
|
self.conn.add_s(lock_dn,modlist)
|
||||||
|
# Pourquoi des locks à la con restent ?
|
||||||
|
# On écrit les locks dans un fichier à des fins de debug
|
||||||
|
try:
|
||||||
|
open('/usr/scripts/gestion/ldap_locks','a').write("%s\t %s\n"%(modlist[1][1], modlist[2]))
|
||||||
|
except:
|
||||||
|
# on ne va pas cracher le script à cause du debug !
|
||||||
|
pass
|
||||||
except ldap.ALREADY_EXISTS :
|
except ldap.ALREADY_EXISTS :
|
||||||
# Pas de chance, le lock est déja pris
|
# Pas de chance, le lock est déja pris
|
||||||
try :
|
try :
|
||||||
|
@ -362,16 +369,16 @@ class crans_ldap :
|
||||||
if l != lockid :
|
if l != lockid :
|
||||||
# C'est locké par un autre process que le notre
|
# C'est locké par un autre process que le notre
|
||||||
# il tourne encore ?
|
# il tourne encore ?
|
||||||
if l.split('-')[0] == hostname and os.system('ps %s > /dev/null 2>&1' % l.split('-')[1] ) :
|
if l.split('-')[0] == hostname and os.system('ps %s > /dev/null 2>&1' % l.split('-')[1] ) :
|
||||||
# Il ne tourne plus
|
# Il ne tourne plus
|
||||||
self.remove_lock(res[0]) # delock
|
self.remove_lock(res[0]) # delock
|
||||||
return self.lock(item,valeur) # relock
|
return self.lock(item,valeur) # relock
|
||||||
raise EnvironmentError(u'Objet (%s=%s) locké, patienter.' % (item, valeur), l)
|
raise EnvironmentError(u'Objet (%s=%s) locké, patienter.' % (item, valeur), l)
|
||||||
else :
|
else :
|
||||||
if not hasattr(self,'_locks') :
|
if not hasattr(self,'_locks') :
|
||||||
self._locks = [lock_dn]
|
self._locks = [lock_dn]
|
||||||
else :
|
else :
|
||||||
self._locks.append(lock_dn)
|
self._locks.append(lock_dn)
|
||||||
|
|
||||||
def remove_lock(self,lockdn) :
|
def remove_lock(self,lockdn) :
|
||||||
""" Destruction d'un lock
|
""" Destruction d'un lock
|
||||||
|
@ -379,11 +386,11 @@ class crans_ldap :
|
||||||
# Mettre des verifs ?
|
# Mettre des verifs ?
|
||||||
if lockdn!='*' :
|
if lockdn!='*' :
|
||||||
self.conn.delete_s(lockdn)
|
self.conn.delete_s(lockdn)
|
||||||
try:
|
try:
|
||||||
self._locks.remove(lockdn)
|
self._locks.remove(lockdn)
|
||||||
except:
|
except:
|
||||||
# Pas grave si ca foire, le lock n'y est plus
|
# Pas grave si ca foire, le lock n'y est plus
|
||||||
pass
|
pass
|
||||||
else :
|
else :
|
||||||
locks = self.list_locks()
|
locks = self.list_locks()
|
||||||
for l in locks :
|
for l in locks :
|
||||||
|
@ -397,78 +404,78 @@ class crans_ldap :
|
||||||
""" Si new = None retourne la liste des services à redémarrer
|
""" Si new = None retourne la liste des services à redémarrer
|
||||||
Si new est fourni et ne commence pas par - ajoute le service à la liste
|
Si new est fourni et ne commence pas par - ajoute le service à la liste
|
||||||
avec les arguments args (args doit être une liste).
|
avec les arguments args (args doit être une liste).
|
||||||
start indique la date (secondes depuis epoch) à partir du moment ou
|
start indique la date (secondes depuis epoch) à partir du moment ou
|
||||||
cette action doit être effectué
|
cette action doit être effectué
|
||||||
Si new commence par - supprime le service si son start est plus vieux que maintenant
|
Si new commence par - supprime le service si son start est plus vieux que maintenant
|
||||||
Si new commence par -- supprime dans condition.
|
Si new commence par -- supprime dans condition.
|
||||||
"""
|
"""
|
||||||
if new : new = preattr(new)[1]
|
if new : new = preattr(new)[1]
|
||||||
|
|
||||||
# Quels services sont déjà à redémarrer ?
|
# Quels services sont déjà à redémarrer ?
|
||||||
serv = {} # { service : [ arguments ] }
|
serv = {} # { service : [ arguments ] }
|
||||||
serv_dates = {} # { service : [ dates de restart ] }
|
serv_dates = {} # { service : [ dates de restart ] }
|
||||||
services = []
|
services = []
|
||||||
for s in self.conn.search_s(self.base_services,1,'objectClass=service') :
|
for s in self.conn.search_s(self.base_services,1,'objectClass=service') :
|
||||||
s=s[1]
|
s=s[1]
|
||||||
serv[s['cn'][0]] = s.get('args',[])
|
serv[s['cn'][0]] = s.get('args',[])
|
||||||
serv_dates[s['cn'][0]] = s.get('start',[])
|
serv_dates[s['cn'][0]] = s.get('start',[])
|
||||||
services.append(service(s['cn'][0],s.get('args',[]),s.get('start',[])))
|
services.append(service(s['cn'][0],s.get('args',[]),s.get('start',[])))
|
||||||
|
|
||||||
# Retourne la liste des services à redémarrer
|
|
||||||
if not new : return services
|
|
||||||
|
|
||||||
# Effacement d'un service
|
# Retourne la liste des services à redémarrer
|
||||||
if new[0] == '-' :
|
if not new : return services
|
||||||
if new[1] == '-' :
|
|
||||||
# Double -- on enlève quelque soit la date
|
# Effacement d'un service
|
||||||
remove_dn='cn=%s,%s' % ( new[2:], self.base_services )
|
if new[0] == '-' :
|
||||||
else :
|
if new[1] == '-' :
|
||||||
# On enlève uniquement si la date est passée
|
# Double -- on enlève quelque soit la date
|
||||||
remove_dn='cn=%s,%s' % ( new[1:], self.base_services )
|
remove_dn='cn=%s,%s' % ( new[2:], self.base_services )
|
||||||
if not serv.has_key(new[1:]) :
|
else :
|
||||||
# Existe pas => rien à faire
|
# On enlève uniquement si la date est passée
|
||||||
return
|
remove_dn='cn=%s,%s' % ( new[1:], self.base_services )
|
||||||
keep_date=[]
|
if not serv.has_key(new[1:]) :
|
||||||
for date in serv_dates[new[1:]] :
|
# Existe pas => rien à faire
|
||||||
if time.time() < int(date) :
|
return
|
||||||
keep_date.append(date)
|
keep_date=[]
|
||||||
if keep_date :
|
for date in serv_dates[new[1:]] :
|
||||||
self.conn.modify_s(remove_dn,ldap.modlist.modifyModlist({'start' : serv_dates[new[1:]]}, { 'start' : keep_date }))
|
if time.time() < int(date) :
|
||||||
remove_dn=None
|
keep_date.append(date)
|
||||||
|
if keep_date :
|
||||||
if remove_dn :
|
self.conn.modify_s(remove_dn,ldap.modlist.modifyModlist({'start' : serv_dates[new[1:]]}, { 'start' : keep_date }))
|
||||||
# Supression
|
remove_dn=None
|
||||||
try : self.conn.delete_s(remove_dn)
|
|
||||||
except : pass
|
if remove_dn :
|
||||||
# Si n'existe pas => Erreur mais le résultat est la.
|
# Supression
|
||||||
return
|
try : self.conn.delete_s(remove_dn)
|
||||||
|
except : pass
|
||||||
|
# Si n'existe pas => Erreur mais le résultat est la.
|
||||||
|
return
|
||||||
|
|
||||||
serv_dn = 'cn=%s,%s' % ( new, self.base_services )
|
serv_dn = 'cn=%s,%s' % ( new, self.base_services )
|
||||||
|
|
||||||
# Petite fonction à appliquer aux arguments
|
# Petite fonction à appliquer aux arguments
|
||||||
if type(args) == str : args = [ args ]
|
if type(args) == str : args = [ args ]
|
||||||
args=map(lambda x:preattr(x)[1] ,args)
|
args=map(lambda x:preattr(x)[1] ,args)
|
||||||
if type(start) == int : start = [ start ]
|
if type(start) == int : start = [ start ]
|
||||||
start=map(lambda x:preattr(x)[1] ,start)
|
start=map(lambda x:preattr(x)[1] ,start)
|
||||||
|
|
||||||
if new in serv.keys() :
|
if new in serv.keys() :
|
||||||
modlist = []
|
modlist = []
|
||||||
|
|
||||||
new_args = []
|
new_args = []
|
||||||
# Nouveaux arguments ?
|
# Nouveaux arguments ?
|
||||||
for arg in args :
|
for arg in args :
|
||||||
if arg not in serv[new] :
|
if arg not in serv[new] :
|
||||||
new_args.append(arg)
|
new_args.append(arg)
|
||||||
if new_args :
|
if new_args :
|
||||||
modlist += ldap.modlist.modifyModlist({ 'args' : serv[new]}, { 'args' : serv[new] + new_args })
|
modlist += ldap.modlist.modifyModlist({ 'args' : serv[new]}, { 'args' : serv[new] + new_args })
|
||||||
|
|
||||||
new_date = []
|
new_date = []
|
||||||
# Nouvelle date ?
|
# Nouvelle date ?
|
||||||
for date in start :
|
for date in start :
|
||||||
if date not in serv_dates[new] :
|
if date not in serv_dates[new] :
|
||||||
new_date.append(date)
|
new_date.append(date)
|
||||||
if new_date :
|
if new_date :
|
||||||
modlist += ldap.modlist.modifyModlist({'start' : serv_dates[new]}, { 'start' : serv_dates[new] + new_date })
|
modlist += ldap.modlist.modifyModlist({'start' : serv_dates[new]}, { 'start' : serv_dates[new] + new_date })
|
||||||
|
|
||||||
if modlist :
|
if modlist :
|
||||||
try :
|
try :
|
||||||
|
@ -478,11 +485,11 @@ class crans_ldap :
|
||||||
pass
|
pass
|
||||||
# else rien à faire
|
# else rien à faire
|
||||||
else :
|
else :
|
||||||
# Entrée non présente -> ajout
|
# Entrée non présente -> ajout
|
||||||
modlist = ldap.modlist.addModlist({ 'objectClass' : 'service' ,
|
modlist = ldap.modlist.addModlist({ 'objectClass' : 'service' ,
|
||||||
'cn' : new ,
|
'cn' : new ,
|
||||||
'args' : args ,
|
'args' : args ,
|
||||||
'start' : start } )
|
'start' : start } )
|
||||||
try :
|
try :
|
||||||
self.conn.add_s(serv_dn,modlist)
|
self.conn.add_s(serv_dn,modlist)
|
||||||
except ldap.ALREADY_EXISTS :
|
except ldap.ALREADY_EXISTS :
|
||||||
|
@ -527,8 +534,8 @@ class crans_ldap :
|
||||||
el = '(%s=%s*)' % ( champ, expr)
|
el = '(%s=%s*)' % ( champ, expr)
|
||||||
elif champ == 'macAddress' :
|
elif champ == 'macAddress' :
|
||||||
# Formatage adresse mac
|
# Formatage adresse mac
|
||||||
try: el = '(macAddress=%s)' % format_mac(expr)
|
try: el = '(macAddress=%s)' % format_mac(expr)
|
||||||
except : pass
|
except : pass
|
||||||
elif champ == 'paiement' and expr == 'ok' :
|
elif champ == 'paiement' and expr == 'ok' :
|
||||||
# Paiement donnant droit à une connexion maintenant ?
|
# Paiement donnant droit à une connexion maintenant ?
|
||||||
# il doit avoir payé pour
|
# il doit avoir payé pour
|
||||||
|
@ -614,14 +621,14 @@ class crans_ldap :
|
||||||
if not r['machine'] and not r['adherent'] and not r['club'] :
|
if not r['machine'] and not r['adherent'] and not r['club'] :
|
||||||
# Pas de réponses
|
# Pas de réponses
|
||||||
return result
|
return result
|
||||||
elif len(conds) == 1 :
|
elif len(conds) == 1 :
|
||||||
# Filtre sur un seul champ
|
# Filtre sur un seul champ
|
||||||
# => on retourne tout
|
# => on retourne tout
|
||||||
for i in filtres :
|
for i in filtres :
|
||||||
if not r[i] : continue
|
if not r[i] : continue
|
||||||
for res in r[i] :
|
for res in r[i] :
|
||||||
result[i].append(globals()[i](res,mode,self.conn))
|
result[i].append(globals()[i](res,mode,self.conn))
|
||||||
elif not r['adherent'] and not r['club'] :
|
elif not r['adherent'] and not r['club'] :
|
||||||
# Il n'y avait seulement un filtre machine
|
# Il n'y avait seulement un filtre machine
|
||||||
# => on retourne uniquement les machines trouvées
|
# => on retourne uniquement les machines trouvées
|
||||||
for m in r['machine'] :
|
for m in r['machine'] :
|
||||||
|
@ -804,23 +811,23 @@ class base_classes_crans(crans_ldap) :
|
||||||
# Verif que les dates sont OK
|
# Verif que les dates sont OK
|
||||||
if new[0] == 'now' :
|
if new[0] == 'now' :
|
||||||
new[0] = time.strftime(date_format)
|
new[0] = time.strftime(date_format)
|
||||||
debut=0
|
debut=0
|
||||||
else :
|
else :
|
||||||
try : debut=int(time.mktime(time.strptime(new[0],date_format)))
|
try : debut=int(time.mktime(time.strptime(new[0],date_format)))
|
||||||
except : raise ValueError(u'Date de début blacklist invalide')
|
except : raise ValueError(u'Date de début blacklist invalide')
|
||||||
|
|
||||||
if new[1] == 'now' :
|
if new[1] == 'now' :
|
||||||
new[1] = time.strftime(date_format)
|
new[1] = time.strftime(date_format)
|
||||||
fin=0
|
fin=0
|
||||||
elif new[1]!='-' :
|
elif new[1]!='-' :
|
||||||
try : fin=int(time.mktime(time.strptime(new[1],date_format)))
|
try : fin=int(time.mktime(time.strptime(new[1],date_format)))
|
||||||
except : raise ValueError(u'Date de fin blacklist invalide')
|
except : raise ValueError(u'Date de fin blacklist invalide')
|
||||||
else :
|
else :
|
||||||
fin = -1
|
fin = -1
|
||||||
|
|
||||||
if debut == fin :
|
if debut == fin :
|
||||||
raise ValueError(u'Dates de début et fin identiques')
|
raise ValueError(u'Dates de début et fin identiques')
|
||||||
|
|
||||||
new_c = ','.join(new)
|
new_c = ','.join(new)
|
||||||
new_c = preattr(new_c)[1]
|
new_c = preattr(new_c)[1]
|
||||||
|
|
||||||
|
@ -832,16 +839,16 @@ class base_classes_crans(crans_ldap) :
|
||||||
if self._data['blacklist'] != liste :
|
if self._data['blacklist'] != liste :
|
||||||
self._data['blacklist']=liste
|
self._data['blacklist']=liste
|
||||||
self.modifs.append('blacklist_' + new[2])
|
self.modifs.append('blacklist_' + new[2])
|
||||||
if not hasattr(self,"__blacklist_restart") :
|
if not hasattr(self,"__blacklist_restart") :
|
||||||
self.__blacklist_restart={}
|
self.__blacklist_restart={}
|
||||||
if not self.__blacklist_restart.has_key(new[2]) :
|
if not self.__blacklist_restart.has_key(new[2]) :
|
||||||
self.__blacklist_restart[new[2]] = [ debut, fin ]
|
self.__blacklist_restart[new[2]] = [ debut, fin ]
|
||||||
else :
|
else :
|
||||||
if debut not in self.__blacklist_restart[new[2]] :
|
if debut not in self.__blacklist_restart[new[2]] :
|
||||||
self.__blacklist_restart[new[2]].append(debut)
|
self.__blacklist_restart[new[2]].append(debut)
|
||||||
if fin!=-1 and fin not in self.__blacklist_restart[new[2]] :
|
if fin!=-1 and fin not in self.__blacklist_restart[new[2]] :
|
||||||
self.__blacklist_restart[new[2]].append(fin)
|
self.__blacklist_restart[new[2]].append(fin)
|
||||||
|
|
||||||
return liste
|
return liste
|
||||||
|
|
||||||
def restore(self) :
|
def restore(self) :
|
||||||
|
@ -916,13 +923,13 @@ class base_classes_crans(crans_ldap) :
|
||||||
modif = modif.replace("solde", "debit %s Euros" % str(diff) )
|
modif = modif.replace("solde", "debit %s Euros" % str(diff) )
|
||||||
else :
|
else :
|
||||||
modif = modif.replace("solde", "credit %s Euros" % str(-diff) )
|
modif = modif.replace("solde", "credit %s Euros" % str(-diff) )
|
||||||
|
|
||||||
if 'droits' in self.modifs:
|
if 'droits' in self.modifs:
|
||||||
anciens_droits = self._init_data.get('droits',[])
|
anciens_droits = self._init_data.get('droits',[])
|
||||||
nouveaux_droits = self._data.get('droits',[])
|
nouveaux_droits = self._data.get('droits',[])
|
||||||
droits_ajoutes = ''.join( [ '+%s' % decode(d) for d in nouveaux_droits if d not in anciens_droits ] )
|
droits_ajoutes = ''.join( [ '+%s' % decode(d) for d in nouveaux_droits if d not in anciens_droits ] )
|
||||||
droits_enleves = ''.join( [ '-%s' % decode(d) for d in anciens_droits if d not in nouveaux_droits ] )
|
droits_enleves = ''.join( [ '-%s' % decode(d) for d in anciens_droits if d not in nouveaux_droits ] )
|
||||||
modif = modif.replace("droits", "droits : " + droits_ajoutes + droits_enleves )
|
modif = modif.replace("droits", "droits : " + droits_ajoutes + droits_enleves )
|
||||||
|
|
||||||
timestamp = localtime()
|
timestamp = localtime()
|
||||||
hist = "%s, %s" % ( time.strftime(date_format, timestamp), script_utilisateur )
|
hist = "%s, %s" % ( time.strftime(date_format, timestamp), script_utilisateur )
|
||||||
|
@ -987,9 +994,9 @@ class base_classes_crans(crans_ldap) :
|
||||||
|
|
||||||
### Génération de la liste de services à redémarrer
|
### Génération de la liste de services à redémarrer
|
||||||
# Quasiement tout est traité dans les classes filles.
|
# Quasiement tout est traité dans les classes filles.
|
||||||
if hasattr(self,"__blacklist_restart") :
|
if hasattr(self,"__blacklist_restart") :
|
||||||
for n,t in self.__blacklist_restart.items() :
|
for n,t in self.__blacklist_restart.items() :
|
||||||
self.services_to_restart("blacklist_%s"%n,[],t)
|
self.services_to_restart("blacklist_%s"%n,[],t)
|
||||||
|
|
||||||
# Reinitialisation
|
# Reinitialisation
|
||||||
self._init_data = self._data.copy()
|
self._init_data = self._data.copy()
|
||||||
|
@ -2173,8 +2180,8 @@ class machine(base_classes_crans) :
|
||||||
|
|
||||||
def exempt(self,new=None) :
|
def exempt(self,new=None) :
|
||||||
"""
|
"""
|
||||||
Liste des réseaux vers lesquels on ne compte pas l'upload
|
Liste des réseaux vers lesquels on ne compte pas l'upload
|
||||||
Cette liste est transférée dans la base postgres de komaz
|
Cette liste est transférée dans la base postgres de komaz
|
||||||
Pour ajouter un réseau new doit être la chaîne
|
Pour ajouter un réseau new doit être la chaîne
|
||||||
représentant le réseau à ajouter
|
représentant le réseau à ajouter
|
||||||
Pour modifier new doit être une liste de la forme :
|
Pour modifier new doit être une liste de la forme :
|
||||||
|
@ -2375,7 +2382,7 @@ class machine(base_classes_crans) :
|
||||||
self.services_to_restart('conf_wifi_ng')
|
self.services_to_restart('conf_wifi_ng')
|
||||||
|
|
||||||
# Reconfiguration clients wifi ?
|
# Reconfiguration clients wifi ?
|
||||||
if self.__typ in ('wifi','borne') and ( 'ipHostNumber' in self.modifs or 'host' in self.modifs or 'macAddress' in self.modifs ) :
|
if self.__typ in ('wifi','borne') and ( 'ipHostNumber' in self.modifs or 'host' in self.modifs or 'macAddress' in self.modifs ) :
|
||||||
self.services_to_restart('conf_wifi_ng')
|
self.services_to_restart('conf_wifi_ng')
|
||||||
|
|
||||||
# Regénération blackliste nécessaire ?
|
# Regénération blackliste nécessaire ?
|
||||||
|
@ -2389,10 +2396,10 @@ class machine(base_classes_crans) :
|
||||||
self.services_to_restart('autostatus')
|
self.services_to_restart('autostatus')
|
||||||
self.services_to_restart('mail_modif',['ip=%s' % self.ip()])
|
self.services_to_restart('mail_modif',['ip=%s' % self.ip()])
|
||||||
|
|
||||||
# Synchronisation avec la base pgsql pour les exemptions
|
# Synchronisation avec la base pgsql pour les exemptions
|
||||||
if 'exempt' in self.modifs or 'ipHostNumber' in self.modifs :
|
if 'exempt' in self.modifs or 'ipHostNumber' in self.modifs :
|
||||||
self.services_to_restart('exemptions')
|
self.services_to_restart('exemptions')
|
||||||
|
|
||||||
# Remise à zéro
|
# Remise à zéro
|
||||||
self.modifs=[]
|
self.modifs=[]
|
||||||
|
|
||||||
|
@ -2500,13 +2507,13 @@ if __name__ == '__main__' :
|
||||||
import sys
|
import sys
|
||||||
if 'lock' in sys.argv :
|
if 'lock' in sys.argv :
|
||||||
db = crans_ldap()
|
db = crans_ldap()
|
||||||
print db.list_locks()
|
for lock in db.list_locks() :
|
||||||
|
print "%s\t %s" % (lock[1]["lockid"][0],lock[0].split(',')[0])
|
||||||
|
|
||||||
if 'purgelock' in sys.argv :
|
if 'purgelock' in sys.argv :
|
||||||
db = crans_ldap()
|
db = crans_ldap()
|
||||||
db.remove_lock('*')
|
db.remove_lock('*')
|
||||||
|
|
||||||
|
|
||||||
if 'menage' in sys.argv :
|
if 'menage' in sys.argv :
|
||||||
print "Ménage des machines des adhérents partis..."
|
print "Ménage des machines des adhérents partis..."
|
||||||
db = crans_ldap()
|
db = crans_ldap()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue