[Python-checkins] r84835 - python/branches/release27-maint/Lib/ctypes/util.py

matthias.klose python-checkins at python.org
Wed Sep 15 15:01:19 CEST 2010


Author: matthias.klose
Date: Wed Sep 15 15:01:19 2010
New Revision: 84835

Log:
Try harder on issue #7356: ctypes.util: Make parsing of ldconfig output
independent of the locale. Set LC_ALL=C too.


Modified:
   python/branches/release27-maint/Lib/ctypes/util.py

Modified: python/branches/release27-maint/Lib/ctypes/util.py
==============================================================================
--- python/branches/release27-maint/Lib/ctypes/util.py	(original)
+++ python/branches/release27-maint/Lib/ctypes/util.py	Wed Sep 15 15:01:19 2010
@@ -185,7 +185,7 @@
         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:


More information about the Python-checkins mailing list