R. David Murray <rdmur...@bitdance.com> added the comment: That can't be done. If an import fails, it fails. But if it succeeds, the module is loaded, and there is no reason to unload it. After all, import in python is idempotent (doing it a second time has no effect other than adding the name to the local namespace). So the import in the module that failed to load may not be the first, and unloading it would break other modules using it.
---------- nosy: +r.david.murray resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue12554> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com