From: W. Trevor King Date: Sun, 20 Jan 2013 12:03:29 +0000 (-0500) Subject: search: `post` and `query` should be Unicode strings X-Git-Tag: v0.1~26 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=40928081cf585958622e17c023c0d221706b5a22;p=mutt-ldap.git search: `post` and `query` should be Unicode strings They're being formatted into the Unicode `filterstr`. Being explicit here should make the transition to Python 3 less annoying. --- diff --git a/mutt-ldap.py b/mutt-ldap.py index 4117177..080bff0 100755 --- 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()]))