From: Matthias Klose Date: Wed, 15 Sep 2010 13:01:19 +0000 (+0000) Subject: Try harder on issue #7356: ctypes.util: Make parsing of ldconfig output X-Git-Tag: v2.7.1rc1~278 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=19f9810a1a17830d7cc88ec0788d9a1909c8b5ad;p=python Try harder on issue #7356: ctypes.util: Make parsing of ldconfig output independent of the locale. Set LC_ALL=C too. --- diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py index adde30798c..52b3520614 100644 --- a/Lib/ctypes/util.py +++ b/Lib/ctypes/util.py @@ -185,7 +185,7 @@ elif os.name == "posix": def _findLib_ldconfig(name): # XXX assuming GLIBC's ldconfig (with option -p) expr = r'/[^\(\)\s]*lib%s\.[^\(\)\s]*' % re.escape(name) - f = os.popen('LANG=C /sbin/ldconfig -p 2>/dev/null') + f = os.popen('LC_ALL=C LANG=C /sbin/ldconfig -p 2>/dev/null') try: data = f.read() finally: