]> granicus.if.org Git - python/commitdiff
- Issue #7356: ctypes.util: Make parsing of ldconfig output independent of
authorMatthias Klose <doko@ubuntu.com>
Mon, 15 Mar 2010 13:42:23 +0000 (13:42 +0000)
committerMatthias Klose <doko@ubuntu.com>
Mon, 15 Mar 2010 13:42:23 +0000 (13:42 +0000)
  the locale.

Lib/ctypes/util.py
Misc/NEWS

index 8f6e3384db1c72317f6590ba52fb019b057693d5..adde30798ca2a1bb7c5ef93e030248f97f408132 100644 (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('/sbin/ldconfig -p 2>/dev/null')
+            f = os.popen('LANG=C /sbin/ldconfig -p 2>/dev/null')
             try:
                 data = f.read()
             finally:
index 7c357a1f1b8d622451984370056387c14dadb4e3..20959bbce1d0bd36b6ecc39a25ffe45dbe34e233 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -20,6 +20,9 @@ Core and Builtins
 Library
 -------
 
+- Issue #7356: ctypes.util: Make parsing of ldconfig output independent of
+  the locale.
+
 - Issue #7774: Set sys.executable to an empty string if ``argv[0]`` has been
   set to an non existent program name and Python is unable to retrieve the real
   program name.