mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Unconditionally import turbojpeg from camera (#141995)
This commit is contained in:
parent
145e02769c
commit
fa9613a879
@ -2,17 +2,10 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from contextlib import suppress
|
||||
import logging
|
||||
from typing import TYPE_CHECKING, Literal, cast
|
||||
|
||||
with suppress(Exception):
|
||||
# TurboJPEG imports numpy which may or may not work so
|
||||
# we have to guard the import here. We still want
|
||||
# to import it at top level so it gets loaded
|
||||
# in the import executor and not in the event loop.
|
||||
from turbojpeg import TurboJPEG
|
||||
|
||||
from turbojpeg import TurboJPEG
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from . import Image
|
||||
|
Loading…
x
Reference in New Issue
Block a user