[chgpass] Better encoding support.

This commit is contained in:
Pierre-Elliott Bécue 2014-09-26 21:00:05 +02:00
parent 6e98266230
commit 4950f104ff

View file

@ -25,7 +25,7 @@ import lc_ldap.attributs
import lc_ldap.objets
import smtplib
encoding = "UTF-8"
encoding = sys.stdout.encoding or "UTF-8"
current_user = os.getenv("SUDO_USER") or os.getenv("USER") or os.getenv("LOGNAME") or getpass.getuser()
def check_password(password, no_cracklib=False, dialog=False):