diff options
author | Zac Medico <zmedico@gentoo.org> | 2011-07-07 12:10:08 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-07-07 12:10:08 -0700 |
commit | ed303d89530b2aafaf1c8a95b2828d35dac7e006 (patch) | |
tree | 49f9c93c7f7f24ebfd11b2b8039028b19f893abf /pym/portage/__init__.py | |
parent | b6581552affa0fa8012447a683322917a031c244 (diff) | |
download | portage-ed303d89530b2aafaf1c8a95b2828d35dac7e006.tar.gz portage-ed303d89530b2aafaf1c8a95b2828d35dac7e006.tar.bz2 portage-ed303d89530b2aafaf1c8a95b2828d35dac7e006.zip |
Remove the _ensure_encodings module.
This was only needed for ancient versions of python built with
USE=build since the ebuilds used to remove the encodings module in
that case. Since the StreamWriter and StreamReader classes may be
deprecated in the near future, now would be a good time to stop
using them.
Diffstat (limited to 'pym/portage/__init__.py')
-rw-r--r-- | pym/portage/__init__.py | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index bc2eedb18..47e2e48e6 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -327,30 +327,6 @@ _python_interpreter = os.path.realpath(sys.executable) _bin_path = PORTAGE_BIN_PATH _pym_path = PORTAGE_PYM_PATH -def _ensure_default_encoding(): - - default_encoding = sys.getdefaultencoding().lower().replace('-', '_') - filesystem_encoding = _encodings['merge'].lower().replace('-', '_') - required_encodings = set(['ascii', 'utf_8']) - required_encodings.add(default_encoding) - required_encodings.add(filesystem_encoding) - missing_encodings = set() - for codec_name in required_encodings: - try: - codecs.lookup(codec_name) - except LookupError: - missing_encodings.add(codec_name) - - if not missing_encodings: - return - - from portage import _ensure_encodings - _ensure_encodings._setup_encodings(default_encoding, - filesystem_encoding, missing_encodings) - -# Do this ASAP since writemsg() might not work without it. -_ensure_default_encoding() - def _shell_quote(s): """ Quote a string in double-quotes and use backslashes to |