Commit 4e8b6611 authored by glondu's avatar glondu

C'est mieux comme ca.

darcs-hash:20060506053425-68412-5c0f24d4a5c2ce7ab4571dd0d53c28deb27080da.gz
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()
db.remove_lock('*')
crans_ldap().remove_lock('*')
elif '--menage' in sys.argv:
print "Mnage des machines des adhrents partis..."
db = CransLdap()
machines = db.search('paiement!=%s&host=*.crans.org' % ann_scol , 'w')['machine']
machines = crans_ldap().search('paiement!=%s&host=*.crans.org' % ann_scol , 'w')['machine']
print "Destruction de %i machines" % len(machines)
for m in machines:
print 'Destruction de %s' % m.nom()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment