Commit 4e8b6611 authored by glondu's avatar glondu

C'est mieux comme ca.

parent e6ed5dde
......@@ -2996,19 +2996,16 @@ if __name__ == '__main__':
elif '--lock' in sys.argv:
print "Liste des locks"
db = CransLdap()
for lock in db.list_locks():
for lock in crans_ldap().list_locks():
print "%s\t %s" % (lock[1]["lockid"][0], lock[0].split(',')[0])
elif '--purgelock' in sys.argv:
print "Suppression de tous les locks"
db = CransLdap()
elif '--menage' in sys.argv:
print "Mnage des machines des adhrents partis..."
db = CransLdap()
machines ='paiement!=%s&host=*' % ann_scol , 'w')['machine']
machines = crans_ldap().search('paiement!=%s&host=*' % ann_scol , 'w')['machine']
print "Destruction de %i machines" % len(machines)
for m in machines:
print 'Destruction de %s' % m.nom()
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment