diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-12-06 00:35:30 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-12-06 00:35:30 +0000 |
commit | dbced94a7b02134f0f70745e3d20b8b895cf48ce (patch) | |
tree | e91bba27aec31fe93674b34795680b3fce39555b | |
parent | 865257483110f49122d07cebfa344b5bb2a78682 (diff) | |
download | portage-dbced94a7b02134f0f70745e3d20b8b895cf48ce.tar.gz portage-dbced94a7b02134f0f70745e3d20b8b895cf48ce.tar.bz2 portage-dbced94a7b02134f0f70745e3d20b8b895cf48ce.zip |
Use portage.StringIO to avoid duplicate import fallback code.
svn path=/main/trunk/; revision=14931
-rw-r--r-- | pym/_emerge/JobStatusDisplay.py | 8 | ||||
-rw-r--r-- | pym/_emerge/Scheduler.py | 9 | ||||
-rw-r--r-- | pym/portage/util.py | 8 |
3 files changed, 3 insertions, 22 deletions
diff --git a/pym/_emerge/JobStatusDisplay.py b/pym/_emerge/JobStatusDisplay.py index bcc682b23..288e355f6 100644 --- a/pym/_emerge/JobStatusDisplay.py +++ b/pym/_emerge/JobStatusDisplay.py @@ -5,15 +5,9 @@ import formatter import sys import time -try: - from io import StringIO -except ImportError: - # Needed for python-2.6 with USE=build since - # io imports threading which imports thread - # which is unavailable. - from StringIO import StringIO import portage +from portage import StringIO from portage import os from portage import _encodings from portage import _unicode_decode diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py index dcd2e47c7..9a5e931ee 100644 --- a/pym/_emerge/Scheduler.py +++ b/pym/_emerge/Scheduler.py @@ -11,15 +11,8 @@ import textwrap import time import weakref -try: - from io import StringIO -except ImportError: - # Needed for python-2.6 with USE=build since - # io imports threading which imports thread - # which is unavailable. - from StringIO import StringIO - import portage +from portage import StringIO from portage import os from portage import _encodings from portage import _unicode_decode diff --git a/pym/portage/util.py b/pym/portage/util.py index c6e0a3120..bb53b0785 100644 --- a/pym/portage/util.py +++ b/pym/portage/util.py @@ -24,15 +24,9 @@ import shlex import stat import string import sys -try: - from io import StringIO -except ImportError: - # Needed for python-2.6 with USE=build since - # io imports threading which imports thread - # which is unavailable. - from StringIO import StringIO import portage +from portage import StringIO from portage import os from portage import _encodings from portage import _os_merge |