From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id D167B1387FD for ; Sat, 29 Mar 2014 18:45:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 57357E0A98; Sat, 29 Mar 2014 18:45:40 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 85431E0A70 for ; Sat, 29 Mar 2014 18:45:39 +0000 (UTC) Received: from pomiot.lan (77-254-69-105.adsl.inetia.pl [77.254.69.105]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id D1EF833F900; Sat, 29 Mar 2014 18:45:37 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-portage-dev@lists.gentoo.org Cc: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-portage-dev] [PATCH 2/2] emerge: call setlocale() to enable system locale. Date: Sat, 29 Mar 2014 19:45:29 +0100 Message-Id: <1396118729-14451-2-git-send-email-mgorny@gentoo.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1396118729-14451-1-git-send-email-mgorny@gentoo.org> References: <1396118729-14451-1-git-send-email-mgorny@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org X-Archives-Salt: 41f1ae33-c9e2-45a5-8116-6148d060e5c4 X-Archives-Hash: acb6ace3b5d7902f3c58436aeedb2167 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 -- 1.9.1