Message 338498 - Python tracker

Message338498

Author skrah
Recipients asmeurer, brett.cannon, eric.snow, ncoghlan, remi.lapeyre, skrah, xtreak
Date 2019-03-20.17:10:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1553101835.28.0.651097017695.issue36370@roundup.psfhosted.org>
In-reply-to
Content
Actually I just see that this behavior of PyImport_GetModule() is documented:

"Return the already imported module with the given name. If the module has not been imported yet then returns NULL but does not set an error. Returns NULL and sets an error if the lookup failed."

New in version 3.7.


So it should indeed be just a matter of always checking for PyErr_Occurred().
History
Date User Action Args
2019-03-20 17:10:35skrahsetrecipients: + skrah, brett.cannon, ncoghlan, eric.snow, remi.lapeyre, asmeurer, xtreak
2019-03-20 17:10:35skrahsetmessageid: <1553101835.28.0.651097017695.issue36370@roundup.psfhosted.org>
2019-03-20 17:10:35skrahlinkissue36370 messages
2019-03-20 17:10:35skrahcreate