Kaydet (Commit) cf1dd711 authored tarafından Matthias Klose's avatar Matthias Klose

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

independent of the locale. Set LC_ALL=C too.
üst 8dd2387a
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment