commit:     295d658510009cae54602aced9322702ec8c8180
Author:     Arfrever Frehtes Taifersar Arahesis <arfrever.fta <AT> gmail <DOT> 
com>
AuthorDate: Wed Sep 14 21:17:24 2016 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Sep 14 21:27:17 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=295d6585

config.environ: handle missing ctypes for check_locale (bug 584328)

X-Gentoo-bug: 584328
X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=584328

 pym/portage/package/ebuild/config.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py 
b/pym/portage/package/ebuild/config.py
index 45b7d08..7de4df7 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -1,4 +1,4 @@
-# Copyright 2010-2015 Gentoo Foundation
+# Copyright 2010-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 from __future__ import unicode_literals
@@ -2790,7 +2790,8 @@ class config(object):
                if eapi_attrs.posixish_locale:
                        split_LC_ALL(mydict)
                        mydict["LC_COLLATE"] = "C"
-                       if not check_locale(silent=True, env=mydict):
+                       # check_locale() returns None when check can not be 
executed.
+                       if check_locale(silent=True, env=mydict) is False:
                                # try another locale
                                for l in ("C.UTF-8", "en_US.UTF-8", 
"en_GB.UTF-8", "C"):
                                        mydict["LC_CTYPE"] = l

Reply via email to