1
0
forked from moepman/bk-dss

dss.py: fix python3 ldap exception handling

Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
This commit is contained in:
Ralf Ramsauer 2018-09-17 21:57:23 +02:00
parent be150eb06f
commit 44dbd1d36c

2
dss.py
View File

@ -184,7 +184,7 @@ def login():
try:
l.simple_bind_s(user, pswd)
except ldap.INVALID_CREDENTIALS as e:
form.pswd.errors.append(e.message['desc'])
form.pswd.errors.append('Invalid Credentials')
l.unbind_s()
return render_template('login.html', form=form, nav=buildNav())
l.unbind_s()