From: W. Trevor King Date: Sun, 20 Jan 2013 13:34:13 +0000 (-0500) Subject: Adapt to Unicode sys.argv X-Git-Tag: v0.1~23 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6571c260b972da7d3109d61ef34aee3f984c9c0a;p=mutt-ldap.git Adapt to Unicode sys.argv --- diff --git a/mutt-ldap.py b/mutt-ldap.py index d0f674a..03f8df9 100755 --- a/mutt-ldap.py +++ b/mutt-ldap.py @@ -177,10 +177,10 @@ if __name__ == '__main__': sys.argv = [unicode(arg, argv_encoding) for arg in sys.argv] if len(sys.argv) < 2: - sys.stderr.write('{0}: no search string given\n'.format(sys.argv[0])) + sys.stderr.write(u'{0}: no search string given\n'.format(sys.argv[0])) sys.exit(1) - query = unicode(' '.join(sys.argv[1:]), 'utf-8') + query = u' '.join(sys.argv[1:]) (cache_hit, addresses) = cache_lookup(query)