]> granicus.if.org Git - python/commitdiff
Try harder on issue #7356: ctypes.util: Make parsing of ldconfig output
authorMatthias Klose <doko@ubuntu.com>
Wed, 15 Sep 2010 13:01:19 +0000 (13:01 +0000)
committerMatthias Klose <doko@ubuntu.com>
Wed, 15 Sep 2010 13:01:19 +0000 (13:01 +0000)
independent of the locale. Set LC_ALL=C too.

Lib/ctypes/util.py

index adde30798ca2a1bb7c5ef93e030248f97f408132..52b35206145fba877dd3607272759b216bfd39c6 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('LANG=C /sbin/ldconfig -p 2>/dev/null')
+            f = os.popen('LC_ALL=C LANG=C /sbin/ldconfig -p 2>/dev/null')
             try:
                 data = f.read()
             finally: