search: `post` and `query` should be Unicode strings
authorW. Trevor King <wking@tremily.us>
Sun, 20 Jan 2013 12:03:29 +0000 (07:03 -0500)
committerW. 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

index 4117177a6aeb49aaad53cfda255d7e76e1bc4743..080bff045f7928cc3cf81467d2b4afd552855bf1 100755 (executable)
@@ -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()]))