From 6f5dda26fffd5457f82ccb9bd12b2d1d0a42c970 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Mon, 21 Sep 2009 17:00:59 +0000 Subject: [PATCH] Fix portage._unicode_func_wrapper.__call__() to properly handle bytes with Python 3. svn path=/main/trunk/; revision=14331 --- pym/portage/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index a5a16734e..043486542 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -189,8 +189,8 @@ class _unicode_func_wrapper(object): rval = self._func(*wrapped_args, **wrapped_kwargs) - if isinstance(rval, (basestring, list, tuple)): - if isinstance(rval, basestring): + if isinstance(rval, (bytes, basestring, list, tuple)): + if isinstance(rval, (bytes, basestring)): rval = _unicode_decode(rval, encoding=encoding, errors='replace') else: -- 2.26.2