1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
From: Till Kamppeter <till.kamppeter@gmail.com>
Date: Fri, 22 Jul 2016 09:33:06 +0200
Subject: Fix download and installation of HP's proprietary plug-in in Python3
environments
LP: #1422004
---
base/pkit.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/base/pkit.py b/base/pkit.py
index f3f1e44..6a848ef 100644
--- a/base/pkit.py
+++ b/base/pkit.py
@@ -35,9 +35,12 @@ import dbus
import dbus.service
if PY3:
- from gi import _gobject as gobject
+ try:
+ from gi._gobject import MainLoop
+ except:
+ from gi.repository.GLib import MainLoop
else:
- import gobject
+ from gobject import MainLoop
import warnings
# Ignore: .../dbus/connection.py:242: DeprecationWarning: object.__init__() takes no parameters
@@ -207,7 +210,7 @@ if utils.to_bool(sys_conf.get('configure', 'policy-kit')):
super(BackendService, self).__init__(connection, path)
self.name = dbus.service.BusName(self.SERVICE_NAME, connection)
- self.loop = gobject.MainLoop()
+ self.loop = MainLoop()
self.version = 0
log.set_level("debug")
|