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 8193013877A for ; Tue, 19 Aug 2014 12:18:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 81A88E0A70; Tue, 19 Aug 2014 12:17:56 +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 936C5E0A96 for ; Tue, 19 Aug 2014 12:17:39 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 11BD43403AA for ; Tue, 19 Aug 2014 12:17:36 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5399F3BB9 for ; Tue, 19 Aug 2014 07:01:05 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1407627482.d40b4f1b0b21de67286a47aa10632e40996f6d06.mgorny@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/main.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: d40b4f1b0b21de67286a47aa10632e40996f6d06 X-VCS-Branch: master Date: Tue, 19 Aug 2014 07:01:05 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 65b21604-10fc-4d54-9317-b7935fb97d08 X-Archives-Hash: 0fcf2149059d50a549f03648aa1de25a commit: d40b4f1b0b21de67286a47aa10632e40996f6d06 Author: Mike Gilbert gentoo org> AuthorDate: Wed Aug 6 21:39:14 2014 +0000 Commit: Michał Górny gentoo org> CommitDate: Sat Aug 9 23:38:02 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=d40b4f1b emerge: fix invalid locale setting (bug 519074) Don't die when the user has an invalid locale setting. Resolves bug 519074. --- pym/_emerge/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index 1a920f7..52aa9c5 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -999,7 +999,10 @@ def emerge_main(args=None): args = portage._decode_argv(args) # Use system locale. - locale.setlocale(locale.LC_ALL, '') + try: + locale.setlocale(locale.LC_ALL, '') + except locale.Error as e: + writemsg_level("setlocale: %s\n" % e, level=logging.WARN) # Disable color until we're sure that it should be enabled (after # EMERGE_DEFAULT_OPTS has been parsed).