[Python-checkins] cpython (3.5): Issue #18893: Fix invalid exception handling in Lib/ctypes/macholib/dyld.py
berker.peksag
python-checkins at python.org
Mon Sep 26 16:06:11 EDT 2016
https://hg.python.org/cpython/rev/e9f34d382eda
changeset: 104078:e9f34d382eda
branch: 3.5
parent: 104073:413962973ea6
user: Berker Peksag <berker.peksag at gmail.com>
date: Mon Sep 26 23:06:32 2016 +0300
summary:
Issue #18893: Fix invalid exception handling in Lib/ctypes/macholib/dyld.py
Patch by Madison May.
files:
Lib/ctypes/macholib/dyld.py | 5 +++--
Misc/NEWS | 3 +++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Lib/ctypes/macholib/dyld.py b/Lib/ctypes/macholib/dyld.py
--- a/Lib/ctypes/macholib/dyld.py
+++ b/Lib/ctypes/macholib/dyld.py
@@ -135,10 +135,11 @@
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 @@
try:
return dyld_find(fn, executable_path=executable_path, env=env)
except ValueError:
- raise e
+ raise error
def test_dyld_find():
env = {}
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -80,6 +80,9 @@
Library
-------
+- Issue #18893: Fix invalid exception handling in Lib/ctypes/macholib/dyld.py.
+ Patch by Madison May.
+
- Issue #27611: Fixed support of default root window in the tkinter.tix module.
- Issue #27348: In the traceback module, restore the formatting of exception
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list