[jhbuild] sysdeps: use PyGObject when possible for main loop
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild] sysdeps: use PyGObject when possible for main loop
- Date: Sat, 6 Jan 2018 23:55:39 +0000 (UTC)
commit 54c8e37b1e0739a7d5094b28735187b4e945bf49
Author: Christian Hergert <chergert redhat com>
Date: Fri Jan 5 14:07:21 2018 -0800
sysdeps: use PyGObject when possible for main loop
If we have gi.repository.GLib, it is suitable (API-wise) to create
a GMainLoop that integrates the same as the old glib module.
This fixes installation on Fedora systems that don't have the old
glib python module available.
https://bugzilla.gnome.org/show_bug.cgi?id=792255
jhbuild/utils/systeminstall.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/jhbuild/utils/systeminstall.py b/jhbuild/utils/systeminstall.py
index 1c53b10..0399621 100644
--- a/jhbuild/utils/systeminstall.py
+++ b/jhbuild/utils/systeminstall.py
@@ -254,7 +254,10 @@ class PKSystemInstall(SystemInstall):
try:
import glib
except:
- raise SystemExit(_('Error: python-gobject package not found.'))
+ try:
+ from gi.repository import GLib as glib
+ except:
+ raise SystemExit(_('Error: python-gobject package not found.'))
self._loop = glib.MainLoop()
if self._sysbus is None:
try:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]