[gestion/chgpass.py] cracklib to lowercase

Maintenant il repond "OK" au lieu de "ok" ...

darcs-hash:20100308130051-ddb99-fbb963cdce5d0a94024ac8244cc1fb49395b1a92.gz
This commit is contained in:
Michel Blockelet 2010-03-08 14:00:51 +01:00
parent ac49fc2d8c
commit be2242635f

View file

@ -104,7 +104,7 @@ Il ne doit pas être basé sur un mot du dictionnaire.""", 'jaune')
## 4 - Cracklib ## 4 - Cracklib
test = commands.getoutput("echo '%s' | /usr/sbin/cracklib-check" % mdp) test = commands.getoutput("echo '%s' | /usr/sbin/cracklib-check" % mdp)
if test.split(':')[-1] != ' ok' : if test.split(':')[-1].lower() != ' ok' :
commentaire = { commentaire = {
' it does not contain enough DIFFERENT characters': u'Il y a trop de caractères identiques.' , ' it does not contain enough DIFFERENT characters': u'Il y a trop de caractères identiques.' ,
' it is based on a dictionary word': u'Le mot de passe est basé sur un mot du dictionnaire' , ' it is based on a dictionary word': u'Le mot de passe est basé sur un mot du dictionnaire' ,