fix hs (for real this time)

master
mutantmonkey 2011-09-14 20:29:42 -04:00
parent 8d4e0a741b
commit c8512991ed
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ def hs(phenny, input):
results = RESULTS_URL.format(urlquote(q)) results = RESULTS_URL.format(urlquote(q))
try: try:
s = search('(|(uupid={0})(mail={0})(cn={1}))'.format(q)) s = search('(|(uupid={0})(mail={0})(cn={0}))'.format(q))
if not s: if not s:
s = search('(|(uupid=*{0}*)(mail=*{0}*)(cn=*{1}*))'.format(q, '*'.join(q.split(' ')))) s = search('(|(uupid=*{0}*)(mail=*{0}*)(cn=*{1}*))'.format(q, '*'.join(q.split(' '))))
except ldap.FILTER_ERROR: except ldap.FILTER_ERROR: