This is an archive of the discontinued LLVM Phabricator instance.

Fix dynamic import of http.client
ClosedPublic

Authored by thopre on Apr 30 2020, 9:57 AM.

Details

Summary

Contrary to import, importlib.import_module returns the specified
package or module while import returns the top-level package or
module and is thus what http would be bound to when importing
http.client. This commit fixes the import of http.client so that the
http module is bound to the http variable. Without this change LNT
crashes when receiving an HTTP response not between 200 and 400 (not
included).

Event Timeline

thopre created this revision.Apr 30 2020, 9:57 AM
cmatthews accepted this revision.Apr 30 2020, 10:11 AM

Thanks!

This revision is now accepted and ready to land.Apr 30 2020, 10:11 AM
thopre closed this revision.Apr 30 2020, 10:23 AM