summaryrefslogtreecommitdiffstats
path: root/pym/portage/sets
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-02-27 03:24:13 +0000
committerZac Medico <zmedico@gentoo.org>2009-02-27 03:24:13 +0000
commit58554a0816c282a35e55bf9a9cc821d026e5aacd (patch)
tree28aadb30b12da8912a4cd96e1a1d041d0abb206f /pym/portage/sets
parent19dc1c962ccc1f9a33e05e281f46e2a93eaaed8d (diff)
downloadportage-58554a0816c282a35e55bf9a9cc821d026e5aacd.tar.gz
portage-58554a0816c282a35e55bf9a9cc821d026e5aacd.tar.bz2
portage-58554a0816c282a35e55bf9a9cc821d026e5aacd.zip
Use unicode() so that 2to3 handles py3k compatibility.
svn path=/main/trunk/; revision=12722
Diffstat (limited to 'pym/portage/sets')
-rw-r--r--pym/portage/sets/shell.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/pym/portage/sets/shell.py b/pym/portage/sets/shell.py
index 75912c0be..8114b5133 100644
--- a/pym/portage/sets/shell.py
+++ b/pym/portage/sets/shell.py
@@ -4,7 +4,6 @@
import subprocess
import os
-import sys
from portage.sets.base import PackageSet
from portage.sets import SetConfigError
@@ -35,10 +34,7 @@ class CommandOutputSet(PackageSet):
def load(self):
pipe = subprocess.Popen(self._command, stdout=subprocess.PIPE, shell=True)
if pipe.wait() == os.EX_OK:
- text = pipe.stdout.read()
- if sys.hexversion >= 0x3000000:
- encoding = sys.getdefaultencoding()
- text = text.decode(encoding, 'replace')
+ text = unicode(pipe.stdout.read(), errors='replace')
self._setAtoms(text.splitlines())
def singleBuilder(self, options, settings, trees):