(original) (raw)

changeset: 70376:c540b18b00b9 user: Antoine Pitrou solipsis@pitrou.net date: Wed May 25 18:17:25 2011 +0200 files: Lib/ctypes/util.py Misc/NEWS description: Issue #12045: Avoid duplicate execution of command in ctypes.util._get_soname(). Patch by Sijin Joseph. diff -r db6971ddceee -r c540b18b00b9 Lib/ctypes/util.py --- a/Lib/ctypes/util.py Wed May 25 09:33:37 2011 -0500 +++ b/Lib/ctypes/util.py Wed May 25 18:17:25 2011 +0200 @@ -137,9 +137,7 @@ rv = f.close() if rv == 10: raise OSError('objdump command not found') - with contextlib.closing(os.popen(cmd)) as f: - data = f.read() - res = re.search(r'\sSONAME\s+([^\s]+)', data) + res = re.search(r'\sSONAME\s+([^\s]+)', dump) if not res: return None return res.group(1) diff -r db6971ddceee -r c540b18b00b9 Misc/NEWS --- a/Misc/NEWS Wed May 25 09:33:37 2011 -0500 +++ b/Misc/NEWS Wed May 25 18:17:25 2011 +0200 @@ -161,6 +161,9 @@ Library ------- +- Issue #12045: Avoid duplicate execution of command in ctypes.util._get_soname(). + Patch by Sijin Joseph. + - Issue #10818: Remove the Tk GUI and the serve() function of the pydoc module, pydoc -g has been deprecated in Python 3.2 and it has a new enhanced web server. /solipsis@pitrou.net