The python that's inside stage 1 or 2 is built with a minimal
authorZac Medico <zmedico@gentoo.org>
Sun, 22 Feb 2009 09:56:27 +0000 (09:56 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 22 Feb 2009 09:56:27 +0000 (09:56 -0000)
commitb17b93c125991cd9846ce1bd8925b7190cf13de6
treeecc53748397f34d763801e77d9bb8616dc29d76c
parent16ff4960ac3b3118a9b96e21dc11a64bb7c36e21
The python that's inside stage 1 or 2 is built with a minimal
configuration which does not include the /usr/lib/pythonX.Y/encodings
directory. This results in error like the following:

  LookupError: no codec search functions registered: can't find encoding

In order to solve this problem, detect it early and manually register
a search function for the ascii codec. Starting with python-3.0 this
problem is more noticeable because of stricter handling of encoding
and decoding between strings of characters and bytes.

svn path=/main/trunk/; revision=12684
pym/portage/__init__.py