# HG changeset patch # User Goffi # Date 1698923481 -3600 # Node ID 970b6209526a2b1a58e8695725e768aae88f3473 # Parent 14523ee96538c96617f0f99fe6ed2bbb0a2b5ca8 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. diff -r 14523ee96538 -r 970b6209526a libervia/frontends/tools/webrtc.py --- a/libervia/frontends/tools/webrtc.py Wed Nov 01 14:10:31 2023 +0100 +++ b/libervia/frontends/tools/webrtc.py Thu Nov 02 12:11:21 2023 +0100 @@ -23,12 +23,14 @@ }) 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 @@ 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