fix hs (for real this time)

This commit is contained in:
mutantmonkey
2011-09-14 20:29:42 -04:00
parent 8d4e0a741b
commit c8512991ed

View File

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