From 9a9d786257c3aed8b3fdd0c82e7245b57c7b45f8 Mon Sep 17 00:00:00 2001 From: pauget Date: Sat, 9 Oct 2004 18:12:42 +0200 Subject: [PATCH] Au cas o secrets n'est pas lisible. darcs-hash:20041009161242-41617-248081f984f2c8717b013dad4131ffc31519b716.gz --- gestion/chgpass.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gestion/chgpass.py b/gestion/chgpass.py index 5c4cfde6..f34e4b57 100755 --- a/gestion/chgpass.py +++ b/gestion/chgpass.py @@ -4,7 +4,12 @@ import getpass, commands, os, sys from affich_tools import cprint -from secrets import ldap_password, ldap_auth_dn +try : + from secrets import ldap_password, ldap_auth_dn +except : + sys.stdout.write('Erreur : impossible de lire le fichier de secret !') + ldap_password = '' + ldap_auth_dn = '' def chgpass(dn) : cprint("""Le nouveau mot de passe doit comporter au minimum 6 caractères.