Skip to content

Commit

Permalink
Fix uvloop warning (#29341)
Browse files Browse the repository at this point in the history
  • Loading branch information
pvizeli committed Dec 3, 2019
1 parent 26b63e7 commit 841ce8a
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions homeassistant/components/stream/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@
from .core import PROVIDERS
from .hls import async_setup_hls

try:
import uvloop
except ImportError:
uvloop = None


_LOGGER = logging.getLogger(__name__)

Expand All @@ -42,7 +37,6 @@
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)

Expand All @@ -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 = {}

Expand Down

0 comments on commit 841ce8a

Please sign in to comment.