chgpass: getattr(sys.stdout, 'encoding', 'UTF-8')
Safer
This commit is contained in:
parent
f023c5b0f5
commit
48de9f65cf
1 changed files with 1 additions and 1 deletions
|
@ -25,7 +25,7 @@ import lc_ldap.attributs
|
|||
import lc_ldap.objets
|
||||
import smtplib
|
||||
|
||||
encoding = sys.stdout.encoding or "UTF-8"
|
||||
encoding = getattr(sys.stdout, 'encoding', "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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue