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

Skip to content

Commit 11179b2

Browse files
committed
Issue #18893: Merge from 3.5
2 parents 97932e4 + 8b6b508 commit 11179b2

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

Lib/ctypes/macholib/dyld.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,11 @@ def framework_find(fn, executable_path=None, env=None):
135135
Python.framework
136136
Python.framework/Versions/Current
137137
"""
138+
error = None
138139
try:
139140
return dyld_find(fn, executable_path=executable_path, env=env)
140141
except ValueError as e:
141-
pass
142+
error = e
142143
fmwk_index = fn.rfind('.framework')
143144
if fmwk_index == -1:
144145
fmwk_index = len(fn)
@@ -147,7 +148,7 @@ def framework_find(fn, executable_path=None, env=None):
147148
try:
148149
return dyld_find(fn, executable_path=executable_path, env=env)
149150
except ValueError:
150-
raise e
151+
raise error
151152

152153
def test_dyld_find():
153154
env = {}

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ Core and Builtins
4141
Library
4242
-------
4343

44+
- Issue #18893: Fix invalid exception handling in Lib/ctypes/macholib/dyld.py.
45+
Patch by Madison May.
46+
4447
- Issue #27611: Fixed support of default root window in the tkinter.tix module.
4548
Added the master parameter in the DisplayStyle constructor.
4649

0 commit comments

Comments
 (0)