From: Antoine Pitrou Date: Sat, 23 Apr 2011 15:56:06 +0000 (+0200) Subject: Remove unused private function X-Git-Tag: v3.3.0a1~2520 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6803dc28b1305a73be28abf70e13a029fa4e3fe0;p=python Remove unused private function --- diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py index 5b58422192..e4c204da9e 100644 --- a/Lib/ctypes/util.py +++ b/Lib/ctypes/util.py @@ -172,22 +172,6 @@ elif os.name == "posix": else: - def _findLib_ldconfig(name): - # XXX assuming GLIBC's ldconfig (with option -p) - expr = r'/[^\(\)\s]*lib%s\.[^\(\)\s]*' % re.escape(name) - with contextlib.closing(os.popen('/sbin/ldconfig -p 2>/dev/null')) as f: - data = f.read() - res = re.search(expr, data) - if not res: - # Hm, this works only for libs needed by the python executable. - cmd = 'ldd %s 2>/dev/null' % sys.executable - with contextlib.closing(os.popen(cmd)) as f: - data = f.read() - res = re.search(expr, data) - if not res: - return None - return res.group(0) - def _findSoname_ldconfig(name): import struct if struct.calcsize('l') == 4: