Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 242926d

Browse files
committed
merge commit.
2 parents 656ce50 + b46004c commit 242926d

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

Lib/ctypes/util.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,7 @@ def _get_soname(f):
137137
rv = f.close()
138138
if rv == 10:
139139
raise OSError('objdump command not found')
140-
with contextlib.closing(os.popen(cmd)) as f:
141-
data = f.read()
142-
res = re.search(r'\sSONAME\s+([^\s]+)', data)
140+
res = re.search(r'\sSONAME\s+([^\s]+)', dump)
143141
if not res:
144142
return None
145143
return res.group(1)

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,9 @@ Library
163163

164164
- Issue #11109 - New service_action method for BaseServer, used by
165165
ForkingMixin class for cleanup. Initial Patch by Justin Wark.
166+
167+
- Issue #12045: Avoid duplicate execution of command in ctypes.util._get_soname().
168+
Patch by Sijin Joseph.
166169

167170
- Issue #10818: Remove the Tk GUI and the serve() function of the pydoc module,
168171
pydoc -g has been deprecated in Python 3.2 and it has a new enhanced web

0 commit comments

Comments
 (0)