Skip to content

Commit

Permalink
fix(api): check GTK import individually
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Apr 24, 2023
1 parent 9c337df commit 95e75ff
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api/onnx_web/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,10 @@ def show_system_toast(msg: str) -> None:

sys_name = system()
if sys_name == "Linux":
if importlib.util.find_spec("gi.repository") is not None:
if (
importlib.util.find_spec("gi") is not None
and importlib.util.find_spec("gi.repository") is not None
):
from gi.repository import Notify

if toaster is None:
Expand Down

0 comments on commit 95e75ff

Please sign in to comment.