From 5c204ae352691ba5bfe1df0e7d3440f048c7d934 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 6 Aug 2009 22:39:16 +0000 Subject: [PATCH] In shlex_split(), don't encode unicode for py3k. Thanks to Arfrever. svn path=/main/trunk/; revision=13942 --- pym/portage/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.26.2