commit: 2bca0671b20207b391c58453892b8158b90b128f Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Sat Mar 29 18:45:29 2014 +0000 Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com> CommitDate: Fri Apr 4 22:55:41 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=2bca0671
emerge: call setlocale() to enable system locale This is necessary so that the size formatting function (and possibly other locale-dependant functions in the future) respect the system locale rather than using the 'C' locale. --- pym/_emerge/main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index cfe1332..eddb16c 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -3,6 +3,7 @@ from __future__ import print_function +import locale import platform import sys @@ -984,6 +985,9 @@ def emerge_main(args=None): args = portage._decode_argv(args) + # Use system locale. + locale.setlocale(locale.LC_ALL, '') + # Disable color until we're sure that it should be enabled (after # EMERGE_DEFAULT_OPTS has been parsed). portage.output.havecolor = 0