[Python-Dev] cpython (3.2): ISsue #14988: restore Python 2's behavior of raising ImportError when unable to (original) (raw)
Georg Brandl g.brandl at gmx.net
Sat Jul 21 16:41:51 CEST 2012
- Previous message: [Python-Dev] cpython: Issue #15168: Move importlb.test to test.test_importlib.
- Next message: [Python-Dev] cpython (3.2): ISsue #14988: restore Python 2's behavior of raising ImportError when unable to
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
This looks like it will give an "error return without exception set" if the "if (expat_capi)" directly before the change is true, and expat_capi is then set to NULL in the branch.
Georg
On 07/17/2012 01:25 PM, eli.bendersky wrote:
http://hg.python.org/cpython/rev/d896fd0a8ba7 changeset: 78152:d896fd0a8ba7 branch: 3.2 parent: 78142:71537aba3a0a user: Eli Bendersky <eliben at gmail.com> date: Tue Jul 17 14:20:38 2012 +0300 summary: ISsue #14988: restore Python 2's behavior of raising ImportError when unable to load pyexpat, instead of a SystemError/RuntimeError
files: Modules/elementtree.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/Modules/elementtree.c b/Modules/elementtree.c --- a/Modules/elementtree.c +++ b/Modules/elementtree.c @@ -3117,6 +3117,8 @@ expatcapi->MICROVERSION != XMLMICROVERSION) expatcapi = NULL; } + if (!expatcapi) + return NULL; #endif elementtreeparseerrorobj = PyErrNewException(
Python-checkins mailing list Python-checkins at python.org http://mail.python.org/mailman/listinfo/python-checkins
- Previous message: [Python-Dev] cpython: Issue #15168: Move importlb.test to test.test_importlib.
- Next message: [Python-Dev] cpython (3.2): ISsue #14988: restore Python 2's behavior of raising ImportError when unable to
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]