]> granicus.if.org Git - python/commitdiff
Merged revisions 78979 via svnmerge from
authorMatthias Klose <doko@ubuntu.com>
Mon, 15 Mar 2010 13:46:04 +0000 (13:46 +0000)
committerMatthias Klose <doko@ubuntu.com>
Mon, 15 Mar 2010 13:46:04 +0000 (13:46 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r78979 | matthias.klose | 2010-03-15 14:42:23 +0100 (Mo, 15 Mär 2010) | 3 lines

  - Issue #7356: ctypes.util: Make parsing of ldconfig output independent of
    the locale.
........

Lib/ctypes/util.py
Misc/NEWS

index dca4ec371ec4adf68d2557a01422b3272015b115..1cde0e3a8569e9d5a6fd683999bfba28536b7282 100644 (file)
@@ -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('/sbin/ldconfig -p 2>/dev/null')) as f:
+            with contextlib.closing(os.popen('LANG=C /sbin/ldconfig -p 2>/dev/null')) as f:
                 data = f.read()
             res = re.search(expr, data)
             if not res:
index d92cb54ea616919a5e983c8208412b87e49b49a1..eade42cb694f135e94a76154634e8e76769401fb 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -283,6 +283,9 @@ C-API
 Library
 -------
 
+- Issue #7356: ctypes.util: Make parsing of ldconfig output independent of
+  the locale.
+
 - The internals of the subprocess module on POSIX systems have been replaced
   by an extension module (_posixsubprocess) so that the fork()+exec() can be
   done safely without the possibility of deadlock in multithreaded applications.