Project

General

Profile

fixniveaux.py

Joël Cuissinat, 10/26/2015 02:46 PM

Download (415 Bytes)

 
1
#! /usr/bin/python
2
# -*- coding: utf-8 -*-
3
from scribe.eolegroup import Group
4

    
5
# liste de tuples ('bad', 'good')
6
FIX = ( ('5g', '5eme'), ('3g', '3eme') )
7

    
8
grp = Group()
9
grp.ldap_admin.connect()
10

    
11
for niv in FIX:
12
    classes = grp._get_classes(niveau=niv[0])
13
    for classe in classes.get(niv[0], []):
14
        print "Correction du niveau pour la classe :", classe
15
        grp._set_attr(classe, 'niveau', niv[1])
16

    
17

    
18

    
19

    
20