Get running event loop in debugpy (#52091)
This commit is contained in:
parent
ba3416b724
commit
b112b18848
1 changed files with 2 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
|||
"""The Remote Python Debugger integration."""
|
||||
from __future__ import annotations
|
||||
|
||||
from asyncio import Event, get_event_loop
|
||||
from asyncio import Event, get_running_loop
|
||||
import logging
|
||||
from threading import Thread
|
||||
|
||||
|
@ -44,7 +44,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
|||
call: ServiceCall | None = None, *, wait: bool = True
|
||||
) -> None:
|
||||
"""Enable asyncio debugging and start the debugger."""
|
||||
get_event_loop().set_debug(True)
|
||||
get_running_loop().set_debug(True)
|
||||
|
||||
debugpy.listen((conf[CONF_HOST], conf[CONF_PORT]))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue