summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-07-11 12:17:15 -0700
committerZac Medico <zmedico@gentoo.org>2010-07-11 12:17:15 -0700
commit9d9bdc4620d44cfbd6bdd0c8e4814b68fb7a0a66 (patch)
treee384481656261d2a6c7877c5c470d6670e9abdf2
parente8ef39e89dabf2f9ebc578fcb97a3f157e07ec34 (diff)
downloadportage-9d9bdc4620d44cfbd6bdd0c8e4814b68fb7a0a66.tar.gz
portage-9d9bdc4620d44cfbd6bdd0c8e4814b68fb7a0a66.tar.bz2
portage-9d9bdc4620d44cfbd6bdd0c8e4814b68fb7a0a66.zip
In _unicode_func_wrapper.__call__, don't want to convert return values
which are subclasses of tuple (such as posix.stat_result in python-3.2).
-rw-r--r--pym/portage/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 68b99de6c..acf151aea 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -226,7 +226,9 @@ class _unicode_func_wrapper(object):
rval = self._func(*wrapped_args, **wrapped_kwargs)
- if isinstance(rval, (list, tuple)):
+ # Don't use isinstance() since we don't want to convert subclasses
+ # of tuple such as posix.stat_result in python-3.2.
+ if rval.__class__ in (list, tuple):
decoded_rval = []
for x in rval:
try: