diff options
author | Zac Medico <zmedico@gentoo.org> | 2011-07-12 01:41:09 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-07-12 01:41:09 -0700 |
commit | 5df96179611ce0e98727945b1800b43daccedfc2 (patch) | |
tree | e60d86543cf61b8f8fa93858c4068b2305a6769b /pym/_emerge/EbuildPhase.py | |
parent | 428053ee44e4a14b3c74dc8e541bcb062b31a799 (diff) | |
download | portage-5df96179611ce0e98727945b1800b43daccedfc2.tar.gz portage-5df96179611ce0e98727945b1800b43daccedfc2.tar.bz2 portage-5df96179611ce0e98727945b1800b43daccedfc2.zip |
Remove python-2.6 StringIO.StringIO fallback.
Since the io module in python-2.6 was broken when threading was
disabled, we needed to fall back from io.StringIO to StringIO.StringIO
in this case (typically just for Gentoo's stage1 and stage2 tarballs).
Now that python-2.7 is stable in stages and we rely on io.open() being
available, we can also rely on io.StringIO being available.
Diffstat (limited to 'pym/_emerge/EbuildPhase.py')
-rw-r--r-- | pym/_emerge/EbuildPhase.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pym/_emerge/EbuildPhase.py b/pym/_emerge/EbuildPhase.py index 64d33a8ca..c7f5b8827 100644 --- a/pym/_emerge/EbuildPhase.py +++ b/pym/_emerge/EbuildPhase.py @@ -2,6 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 import gzip +import io import sys import tempfile @@ -23,7 +24,6 @@ portage.proxy.lazyimport.lazyimport(globals(), '_preinst_bsdflags' ) from portage import os -from portage import StringIO from portage import _encodings from portage import _unicode_decode from portage import _unicode_encode @@ -191,7 +191,7 @@ class EbuildPhase(CompositeTask): logfile = self.settings.get("PORTAGE_LOG_FILE") if self.phase == "install": - out = portage.StringIO() + out = io.StringIO() _check_build_log(self.settings, out=out) msg = _unicode_decode(out.getvalue(), encoding=_encodings['content'], errors='replace') @@ -205,7 +205,7 @@ class EbuildPhase(CompositeTask): _post_phase_userpriv_perms(settings) if self.phase == "install": - out = portage.StringIO() + out = io.StringIO() _post_src_install_chost_fix(settings) _post_src_install_uid_fix(settings, out) msg = _unicode_decode(out.getvalue(), @@ -261,7 +261,7 @@ class EbuildPhase(CompositeTask): return if self.phase == "install": - out = portage.StringIO() + out = io.StringIO() _post_src_install_soname_symlinks(self.settings, out) msg = _unicode_decode(out.getvalue(), encoding=_encodings['content'], errors='replace') @@ -333,7 +333,7 @@ class EbuildPhase(CompositeTask): def _elog(self, elog_funcname, lines, background=None): if background is None: background = self.background - out = StringIO() + out = io.StringIO() phase = self.phase elog_func = getattr(elog_messages, elog_funcname) global_havecolor = portage.output.havecolor |