diff options
| author | Matthias Klose <doko@ubuntu.com> | 2010-09-15 13:06:09 (GMT) |
|---|---|---|
| committer | Matthias Klose <doko@ubuntu.com> | 2010-09-15 13:06:09 (GMT) |
| commit | cf1dd711a42d6ba0c7bf5a337eb8b26514c0e5f1 (patch) | |
| tree | 8647c3c694e5c72df62d3e8023268bbe051eefb9 | |
| parent | 8dd2387a609d02f28d7cd9052d8d5eb98197a8f2 (diff) | |
| download | cpython-cf1dd711a42d6ba0c7bf5a337eb8b26514c0e5f1.zip cpython-cf1dd711a42d6ba0c7bf5a337eb8b26514c0e5f1.tar.gz cpython-cf1dd711a42d6ba0c7bf5a337eb8b26514c0e5f1.tar.bz2 | |
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.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py index 1cde0e3..1881e89 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: |
