[jhbuild] systeminstall: don't try to load the static glib bindings
- From: Christoph Reiter <creiter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild] systeminstall: don't try to load the static glib bindings
- Date: Mon, 23 Sep 2019 06:35:53 +0000 (UTC)
commit 36475b9bb6cb9fd09812f856444d59e1328a2b01
Author: Christoph Reiter <reiter christoph gmail com>
Date: Sun Sep 22 21:50:45 2019 +0200
systeminstall: don't try to load the static glib bindings
They don't work with Python 3 and we have pygobject
jhbuild/commands/sanitycheck.py | 4 ++--
jhbuild/utils/systeminstall.py | 9 +++------
2 files changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/jhbuild/commands/sanitycheck.py b/jhbuild/commands/sanitycheck.py
index ed34c1be..454c928b 100644
--- a/jhbuild/commands/sanitycheck.py
+++ b/jhbuild/commands/sanitycheck.py
@@ -135,8 +135,8 @@ class cmd_sanitycheck(Command):
# check for "sysdeps --install" deps:
try:
- import glib
- glib
+ from gi.repository import GLib
+ GLib
except ImportError:
uprint(_('%s not found') % 'python-gobject')
try:
diff --git a/jhbuild/utils/systeminstall.py b/jhbuild/utils/systeminstall.py
index f2588185..1250d12b 100644
--- a/jhbuild/utils/systeminstall.py
+++ b/jhbuild/utils/systeminstall.py
@@ -271,13 +271,10 @@ class PKSystemInstall(SystemInstall):
def _get_new_transaction(self):
if self._loop is None:
try:
- import glib
+ from gi.repository import GLib
except ImportError:
- try:
- from gi.repository import GLib as glib
- except ImportError:
- raise SystemExit(_('Error: python-gobject package not found.'))
- self._loop = glib.MainLoop()
+ raise SystemExit(_('Error: python-gobject package not found.'))
+ self._loop = GLib.MainLoop()
if self._sysbus is None:
try:
import dbus.glib
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]