[scripts] Going to utf-8

This commit is contained in:
Pierre-Elliott Bécue 2013-05-04 19:19:36 +02:00
parent c4a19a88ed
commit a1bf0a4547
54 changed files with 676 additions and 573 deletions

View file

@ -1,7 +1,7 @@
#! /usr/bin/env python
# -*- coding: iso-8859-15 -*-
# -*- coding: utf-8 -*-
# Copyright (C) Frédéric Pauget
# Copyright (C) Frédéric Pauget
# Licence : GPLv2
import smtplib, sys, commands, shutil, os, traceback
@ -18,7 +18,7 @@ try:
from Mailman.UserDesc import UserDesc
from Mailman.Errors import MMAlreadyAMember
except:
# Machine sans mailman, les ML ne seront pas reconfigurées
# Machine sans mailman, les ML ne seront pas reconfigurées
pass
@ -101,7 +101,7 @@ class home:
self.args = args
def reconfigure(self):
cprint(u'Création home', 'gras')
cprint(u'Création home', 'gras')
for args in self.args:
anim('\t' + args)
try:
@ -116,11 +116,11 @@ class home:
os.mkdir(home, 0755)
os.chown(home, int(uid), config.gid)
elif os.path.isdir(home):
# Il y un répertoire existant
# Il y un répertoire existant
# Bon UID ?
stat = os.stat(home)
if stat[4] != int(uid) or stat[5] != config.gid:
# Le home n'est pas pas à la bonne personne
# Le home n'est pas pas à la bonne personne
raise OSError('home existant')
### Quota
@ -226,7 +226,7 @@ class ML_ens:
try:
mlist.ApprovedAddMember(UserDesc(mail))
except MMAlreadyAMember:
cprint(u"DÉJÀ INSCRIT", "jaune")
cprint(u"DÉJÀ INSCRIT", "jaune")
except:
print ERREUR
if self.debug: