From 45938432c6616fe684e67fdf4c5a9615a7c2fc73 Mon Sep 17 00:00:00 2001 From: Chris Liechti Date: Wed, 2 Dec 2020 00:38:30 +0100 Subject: [PATCH] extmod/asyncio: Pass globals in __import__ call. `globals()` needs to be provided in case `__import__` is a Python function. --- extmod/asyncio/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extmod/asyncio/__init__.py b/extmod/asyncio/__init__.py index 1f83750c5a..801af79141 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