From: Zac Medico Date: Thu, 6 Aug 2009 22:39:16 +0000 (-0000) Subject: In shlex_split(), don't encode unicode for py3k. Thanks to Arfrever. X-Git-Tag: v2.2_rc37~24 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5c204ae352691ba5bfe1df0e7d3440f048c7d934;p=portage.git In shlex_split(), don't encode unicode for py3k. Thanks to Arfrever. svn path=/main/trunk/; revision=13942 --- diff --git a/pym/portage/util.py b/pym/portage/util.py index df66723ec..780c9b5f1 100644 --- a/pym/portage/util.py +++ b/pym/portage/util.py @@ -355,7 +355,7 @@ def shlex_split(s): This is equivalent to shlex.split but it temporarily encodes unicode strings to bytes since shlex.split() doesn't handle unicode strings. """ - is_unicode = isinstance(s, unicode) + is_unicode = sys.hexversion < 0x3000000 and isinstance(s, unicode) if is_unicode: s = s.encode('utf_8', 'replace') rval = shlex.split(s)