Gentoo Archives: gentoo-portage-dev

From: "Anthony G. Basile" <basile@××××××××××××××.edu>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH] pym/portage/util/locale.py: add a C module to check locale
Date: Tue, 17 May 2016 19:50:57
Message-Id: 573B761B.5030108@opensource.dyc.edu
In Reply to: [gentoo-portage-dev] [PATCH] pym/portage/util/locale.py: add a C module to check locale by "Anthony G. Basile"
1 On 5/17/16 8:47 AM, Anthony G. Basile wrote:
2 > +
3 > + try:
4 > + from portage_c_check_locale import _c_check_locale
5 > + (ret, msg) = _c_check_locale()
6 > + except ImportError:
7 > + writemsg_level("!!! Unable to import portage_c_check_locale\n",
8 > + level=logging.WARNING, noiselevel=-1)
9 > + (ret, msg) = _ctypes_check_locale()
10 > +
11
12 actually there's an error here. msg returned form _c_check_locale() is
13 a string while what's returned form _ctypes_check_locale() is a list of
14 strings which gets joined later. i kept going back and forth on the
15 code and mixed it up. i'll fix it on revision but i'll wait a bit for
16 other comments first.
17
18 --
19 Anthony G. Basile, Ph. D.
20 Chair of Information Technology
21 D'Youville College
22 Buffalo, NY 14201
23 (716) 829-8197