changeset: 104078:e9f34d382eda branch: 3.5 parent: 104073:413962973ea6 user: Berker Peksag date: Mon Sep 26 23:06:32 2016 +0300 files: Lib/ctypes/macholib/dyld.py Misc/NEWS description: Issue #18893: Fix invalid exception handling in Lib/ctypes/macholib/dyld.py Patch by Madison May. diff -r 413962973ea6 -r e9f34d382eda Lib/ctypes/macholib/dyld.py --- a/Lib/ctypes/macholib/dyld.py Mon Sep 26 22:50:11 2016 +0300 +++ b/Lib/ctypes/macholib/dyld.py Mon Sep 26 23:06:32 2016 +0300 @@ -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 -r 413962973ea6 -r e9f34d382eda Misc/NEWS --- a/Misc/NEWS Mon Sep 26 22:50:11 2016 +0300 +++ b/Misc/NEWS Mon Sep 26 23:06:32 2016 +0300 @@ -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