From 23518b03bd63bc4ae702706bcdf5d91a698eab97 Mon Sep 17 00:00:00 2001 From: Markus Hackspacher Date: Wed, 9 Oct 2024 14:12:15 +0200 Subject: [PATCH] run /bin/gpo without install Module PyGObject --- src/gpodder/util.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gpodder/util.py b/src/gpodder/util.py index 0690af65b..7855c15f5 100644 --- a/src/gpodder/util.py +++ b/src/gpodder/util.py @@ -181,7 +181,11 @@ def make_directory(path): Returns True if the directory exists after the function call, False otherwise. """ - from gi.repository import Gio, GLib + try: + from gi.repository import Gio, GLib + except ImportError: + print('Error: Module "PyGObject" not found.') + return False if not isinstance(path, Gio.File): path = new_gio_file(path)