diff options
| author | Chris Liechti <cliechti@gmx.net> | 2020-12-02 00:38:30 +0100 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2025-11-21 00:07:35 +1100 |
| commit | 45938432c6616fe684e67fdf4c5a9615a7c2fc73 (patch) | |
| tree | 46af199263beacb57769545286a7ed3ad1e603d3 /extmod | |
| parent | 48d96b400e73e7fbcca8365d0bebc0c41402dde5 (diff) | |
extmod/asyncio: Pass globals in __import__ call.
`globals()` needs to be provided in case `__import__` is a Python function.
Diffstat (limited to 'extmod')
| -rw-r--r-- | extmod/asyncio/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extmod/asyncio/__init__.py b/extmod/asyncio/__init__.py index 1f83750c5..801af7914 100644 --- a/extmod/asyncio/__init__.py +++ b/extmod/asyncio/__init__.py @@ -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 |
