mirror of
https://github.com/micropython/micropython.git
synced 2025-12-15 17:30:14 +01:00
extmod/asyncio: Pass globals in __import__ call.
`globals()` needs to be provided in case `__import__` is a Python function.
This commit is contained in:
committed by
Damien George
parent
48d96b400e
commit
45938432c6
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user