summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2016-09-26 20:06:32 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2016-09-26 20:06:32 (GMT)
commit8b6b50814e953abca74a1b7e03b56fa34d0183bd (patch)
treea26212bb7cb741c7754131246273d0267a1c9e3c /Lib
parent6129e14b216101521f5abcc20d1d8c60c1d95713 (diff)
downloadcpython-8b6b50814e953abca74a1b7e03b56fa34d0183bd.zip
cpython-8b6b50814e953abca74a1b7e03b56fa34d0183bd.tar.gz
cpython-8b6b50814e953abca74a1b7e03b56fa34d0183bd.tar.bz2
Issue #18893: Fix invalid exception handling in Lib/ctypes/macholib/dyld.py
Patch by Madison May.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/ctypes/macholib/dyld.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/ctypes/macholib/dyld.py b/Lib/ctypes/macholib/dyld.py
index dc7052e..c158e67 100644
--- a/Lib/ctypes/macholib/dyld.py
+++ b/Lib/ctypes/macholib/dyld.py
@@ -135,10 +135,11 @@ def framework_find(fn, executable_path=None, env=None):
Python.framework
Python.framework/Versions/Current
"""
+ error = None
try:
return dyld_find(fn, executable_path=executable_path, env=env)
except ValueError as e:
- pass
+ error = e
fmwk_index = fn.rfind('.framework')
if fmwk_index == -1:
fmwk_index = len(fn)
@@ -147,7 +148,7 @@ def framework_find(fn, executable_path=None, env=None):
try:
return dyld_find(fn, executable_path=executable_path, env=env)
except ValueError:
- raise e
+ raise error
def test_dyld_find():
env = {}