Commit c3b543e7 authored by glondu's avatar glondu

ldapwhoami a chang le format de sa sortie sous Etch.

darcs-hash:20070727074606-68412-c008538f49278911a251e3596a78aa8fa6871edd.gz
parent 163c2552
...@@ -179,7 +179,7 @@ if __name__ == '__main__' : ...@@ -179,7 +179,7 @@ if __name__ == '__main__' :
ldap_password = getpass.getpass('Mot de passe actuel : ') ldap_password = getpass.getpass('Mot de passe actuel : ')
s = commands.getoutput("/usr/bin/ldapwhoami -H '%s' -x -D '%s' -w '%s'" % ( uri, ldap_auth_dn, ldap_password ) ).strip() s = commands.getoutput("/usr/bin/ldapwhoami -H '%s' -x -D '%s' -w '%s'" % ( uri, ldap_auth_dn, ldap_password ) ).strip()
try : try :
resultat = s.split(':')[1].strip() resultat = s.split('\n')[0].split(':')[1].strip()
except : except :
cprint(u"Erreur lors de l'authentification", 'rouge') cprint(u"Erreur lors de l'authentification", 'rouge')
sys.exit(7) sys.exit(7)
......
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