frontends (tools/webrtc): Better message on Python override missing:
raise an exception instead of simple `print` to stop loading the module, and show a more detailed message with the package to install.
This commit is contained in:
parent
d96ca8443b
commit
221c73b947
1 changed files with 5 additions and 4 deletions
|
|
@ -23,12 +23,14 @@ gi.require_versions({
|
|||
})
|
||||
from gi.repository import Gst, GstWebRTC, GstSdp
|
||||
|
||||
from libervia.backend.core import exceptions
|
||||
|
||||
try:
|
||||
from gi.overrides import Gst as _
|
||||
except ImportError:
|
||||
print(
|
||||
"no GStreamer python overrides available, please install relevant pacakges on "
|
||||
"your system."
|
||||
raise exceptions.MissingModule(
|
||||
"No GStreamer Python overrides available. Please install relevant packages on "
|
||||
"your system (e.g., `python3-gst-1.0` on Debian and derivatives)."
|
||||
)
|
||||
import asyncio
|
||||
from dataclasses import dataclass
|
||||
|
|
@ -38,7 +40,6 @@ import re
|
|||
from typing import Callable
|
||||
from urllib.parse import quote_plus
|
||||
|
||||
from libervia.backend.core import exceptions
|
||||
from libervia.backend.tools.common import data_format
|
||||
from libervia.frontends.tools import aio
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue