Force bindname to be a string instead of a list

issue4383
review8791002
This commit is contained in:
Sergi Almacellas Abellana
2014-12-05 18:29:17 +01:00
parent 364e89e15d
commit d0e7b3e0da
+2 -2
View File
@@ -44,9 +44,9 @@ def ldap_connection():
if 'tls' in uri.scheme:
conn.start_tls_s()
bindname = extensions.get('bindname')
bindname, = extensions.get('bindname', [None])
if not bindname:
bindname = extensions.get('!bindname')
bindname, = extensions.get('!bindname', [None])
if bindname:
# XXX find better way to get the password
conn.simple_bind_s(bindname, config.get(section, 'bind_pass'))