New submission from Andrew Sommerville <aksommervi...@gmail.com>:

Around line 1509 in Python/import.c, function "find_module", the importer is 
trying to fail with "No module named...". It is possible for "fp" to be NULL 
and "fdp" (the return value) to be non-NULL, which callers would see as success.

Solution: add "fdp=NULL;" to this block:
    if (fp == NULL) {
        PyErr_Format(PyExc_ImportError,
                     "No module named %.200s", name);
    }

(my apologies if this is not the correct place to post...)

----------
components: Interpreter Core
messages: 132803
nosy: aksommerville
priority: normal
severity: normal
status: open
title: Possible bug in Python/import.c
type: behavior
versions: Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11742>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to