From 5df96179611ce0e98727945b1800b43daccedfc2 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 12 Jul 2011 01:41:09 -0700 Subject: 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. --- pym/portage/util/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pym/portage/util/__init__.py') diff --git a/pym/portage/util/__init__.py b/pym/portage/util/__init__.py index b641d3ed2..4aa63d5e3 100644 --- a/pym/portage/util/__init__.py +++ b/pym/portage/util/__init__.py @@ -32,7 +32,7 @@ portage.proxy.lazyimport.lazyimport(globals(), 'portage.dep:Atom', 'portage.util.listdir:_ignorecvs_dirs' ) -from portage import StringIO + from portage import os from portage import subprocess_getstatusoutput from portage import _encodings @@ -63,7 +63,7 @@ def writemsg(mystr,noiselevel=0,fd=None): fd = sys.stderr if noiselevel <= noiselimit: # avoid potential UnicodeEncodeError - if isinstance(fd, StringIO): + if isinstance(fd, io.StringIO): mystr = _unicode_decode(mystr, encoding=_encodings['content'], errors='replace') else: @@ -521,7 +521,7 @@ class _tolerant_shlex(shlex.shlex): except EnvironmentError as e: writemsg(_("!!! Parse error in '%s': source command failed: %s\n") % \ (self.infile, str(e)), noiselevel=-1) - return (newfile, StringIO()) + return (newfile, io.StringIO()) _invalid_var_name_re = re.compile(r'^\d|\W') -- cgit v1.2.3-1-g7c22