diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py index 5a536a22b7b..f6cc88f098c 100644 --- a/Lib/asyncio/base_events.py +++ b/Lib/asyncio/base_events.py @@ -1205,7 +1205,7 @@ class BaseEventLoop(events.AbstractEventLoop): return enabled = bool(enabled) - if self._coroutine_wrapper_set is enabled: + if self._coroutine_wrapper_set == enabled: return wrapper = coroutines.debug_wrapper