Fix uvloop warning (#29341)
This commit is contained in:
parent
26b63e73ad
commit
841ce8ade9
1 changed files with 0 additions and 21 deletions
|
@ -23,11 +23,6 @@ from .const import (
|
|||
from .core import PROVIDERS
|
||||
from .hls import async_setup_hls
|
||||
|
||||
try:
|
||||
import uvloop
|
||||
except ImportError:
|
||||
uvloop = None
|
||||
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -42,7 +37,6 @@ SERVICE_RECORD_SCHEMA = STREAM_SERVICE_SCHEMA.extend(
|
|||
vol.Optional(CONF_LOOKBACK, default=0): int,
|
||||
}
|
||||
)
|
||||
DATA_UVLOOP_WARN = "stream_uvloop_warn"
|
||||
# Set log level to error for libav
|
||||
logging.getLogger("libav").setLevel(logging.ERROR)
|
||||
|
||||
|
@ -53,21 +47,6 @@ def request_stream(hass, stream_source, *, fmt="hls", keepalive=False, options=N
|
|||
if DOMAIN not in hass.config.components:
|
||||
raise HomeAssistantError("Stream integration is not set up.")
|
||||
|
||||
if DATA_UVLOOP_WARN not in hass.data:
|
||||
hass.data[DATA_UVLOOP_WARN] = True
|
||||
# Warn about https://github.com/home-assistant/home-assistant/issues/22999
|
||||
if (
|
||||
uvloop is not None
|
||||
and isinstance(hass.loop, uvloop.Loop)
|
||||
and (
|
||||
"shell_command" in hass.config.components
|
||||
or "ffmpeg" in hass.config.components
|
||||
)
|
||||
):
|
||||
_LOGGER.warning(
|
||||
"You are using UVLoop with stream and shell_command. This is known to cause issues. Please uninstall uvloop."
|
||||
)
|
||||
|
||||
if options is None:
|
||||
options = {}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue