From: Berker Peksag Date: Mon, 26 Sep 2016 20:06:32 +0000 (+0300) Subject: Issue #18893: Fix invalid exception handling in Lib/ctypes/macholib/dyld.py X-Git-Tag: v3.6.0b2~116^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8b6b50814e953abca74a1b7e03b56fa34d0183bd;p=thirdparty%2FPython%2Fcpython.git Issue #18893: Fix invalid exception handling in Lib/ctypes/macholib/dyld.py Patch by Madison May. --- diff --git a/Lib/ctypes/macholib/dyld.py b/Lib/ctypes/macholib/dyld.py index dc7052e74701..c158e672f051 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 = {} diff --git a/Misc/NEWS b/Misc/NEWS index 2ec7c9d477c9..84455c070a57 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -80,6 +80,9 @@ Core and Builtins 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