summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Klose <doko@ubuntu.com>2010-09-15 13:06:09 +0000
committerMatthias Klose <doko@ubuntu.com>2010-09-15 13:06:09 +0000
commitcf1dd711a42d6ba0c7bf5a337eb8b26514c0e5f1 (patch)
tree8647c3c694e5c72df62d3e8023268bbe051eefb9
parent8dd2387a609d02f28d7cd9052d8d5eb98197a8f2 (diff)
downloadcpython-git-cf1dd711a42d6ba0c7bf5a337eb8b26514c0e5f1.tar.gz
Try harder on issue #7356: ctypes.util: Make parsing of ldconfig output
independent of the locale. Set LC_ALL=C too.
-rw-r--r--Lib/ctypes/util.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py
index 1cde0e3a85..1881e89688 100644
--- a/Lib/ctypes/util.py
+++ b/Lib/ctypes/util.py
@@ -205,7 +205,7 @@ elif os.name == "posix":
# XXX assuming GLIBC's ldconfig (with option -p)
expr = r'(\S+)\s+\((%s(?:, OS ABI:[^\)]*)?)\)[^/]*(/[^\(\)\s]*lib%s\.[^\(\)\s]*)' \
% (abi_type, re.escape(name))
- with contextlib.closing(os.popen('LANG=C /sbin/ldconfig -p 2>/dev/null')) as f:
+ with contextlib.closing(os.popen('LC_ALL=C LANG=C /sbin/ldconfig -p 2>/dev/null')) as f:
data = f.read()
res = re.search(expr, data)
if not res: