Try harder on issue #7356: ctypes.util: Make parsing of ldconfig output

independent of the locale. Set LC_ALL=C too.
This commit is contained in:
Matthias Klose 2010-09-15 13:01:19 +00:00
parent f81eef11d6
commit 19f9810a1a
1 changed files with 1 additions and 1 deletions

View File

@ -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: