extmod/asyncio: Pass globals in __import__ call.

`globals()` needs to be provided in case `__import__` is a Python function.
This commit is contained in:
Chris Liechti
2020-12-02 00:38:30 +01:00
committed by Damien George
parent 48d96b400e
commit 45938432c6

View File

@@ -26,6 +26,6 @@ def __getattr__(attr):
mod = _attrs.get(attr, None)
if mod is None:
raise AttributeError(attr)
value = getattr(__import__(mod, None, None, True, 1), attr)
value = getattr(__import__(mod, globals(), None, True, 1), attr)
globals()[attr] = value
return value