Log threading exceptions properly (#34789)

This commit is contained in:
Paulus Schoutsen
2020-04-28 14:31:35 -07:00
committed by GitHub
parent 87801d8aca
commit 0246761f94
3 changed files with 32 additions and 0 deletions

View File

@@ -71,6 +71,7 @@ from homeassistant.exceptions import (
from homeassistant.util import location
from homeassistant.util.async_ import fire_coroutine_threadsafe, run_callback_threadsafe
import homeassistant.util.dt as dt_util
from homeassistant.util.thread import fix_threading_exception_logging
from homeassistant.util.unit_system import IMPERIAL_SYSTEM, METRIC_SYSTEM, UnitSystem
# Typing imports that create a circular dependency
@@ -80,6 +81,7 @@ if TYPE_CHECKING:
block_async_io.enable()
fix_threading_exception_logging()
# pylint: disable=invalid-name
T = TypeVar("T")