projects
/
mutt-ldap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5589000
)
search: `post` and `query` should be Unicode strings
author
W. Trevor King
<wking@tremily.us>
Sun, 20 Jan 2013 12:03:29 +0000
(07:03 -0500)
committer
W. Trevor King
<wking@tremily.us>
Sun, 20 Jan 2013 18:05:18 +0000
(13:05 -0500)
They're being formatted into the Unicode `filterstr`. Being explicit
here should make the transition to Python 3 less annoying.
mutt-ldap.py
patch
|
blob
|
history
diff --git
a/mutt-ldap.py
b/mutt-ldap.py
index 4117177a6aeb49aaad53cfda255d7e76e1bc4743..080bff045f7928cc3cf81467d2b4afd552855bf1 100755
(executable)
--- a/
mutt-ldap.py
+++ b/
mutt-ldap.py
@@
-88,9
+88,9
@@
def connect():
return connection
def search(query, connection):
- post = ''
+ post =
u
''
if query:
- post = '*'
+ post =
u
'*'
filterstr = u'(|{0})'.format(
u' '.join([u'({0}=*{1}{2})'.format(field, query, post)
for field in CONFIG.get('query', 'search_fields').split()]))