projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e8ef39e
)
In _unicode_func_wrapper.__call__, don't want to convert return values
author
Zac Medico
<zmedico@gentoo.org>
Sun, 11 Jul 2010 19:17:15 +0000
(12:17 -0700)
committer
Zac Medico
<zmedico@gentoo.org>
Sun, 11 Jul 2010 19:17:15 +0000
(12:17 -0700)
which are subclasses of tuple (such as posix.stat_result in python-3.2).
pym/portage/__init__.py
patch
|
blob
|
history
diff --git
a/pym/portage/__init__.py
b/pym/portage/__init__.py
index 68b99de6c59d5d6f49324e80600443529d8c67d6..acf151aeaa1ba32d5bb5a064013aefb4b40685d3 100644
(file)
--- 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: