From bbfc2c6e54eee89c92296f47a48892df02b2ca0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Tue, 23 Aug 2016 15:41:52 +0200 Subject: [PATCH] Dropped deprecated/unneeded glib code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolves: rhbz#1369044 Signed-off-by: Jaroslav Škarvada --- tuned/admin/dbus_controller.py | 3 --- tuned/exports/dbus_exporter.py | 5 ++--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/tuned/admin/dbus_controller.py b/tuned/admin/dbus_controller.py index 1b11b18..2721ecb 100644 --- a/tuned/admin/dbus_controller.py +++ b/tuned/admin/dbus_controller.py @@ -24,9 +24,6 @@ class DBusController(object): def _init_proxy(self): try: if self._proxy is None: - # Probably not needed for PyGObject 3.10.2+ - GObject.threads_init() - DBusGMainLoop(set_as_default=True) self._main_loop = GLib.MainLoop() bus = dbus.SystemBus() diff --git a/tuned/exports/dbus_exporter.py b/tuned/exports/dbus_exporter.py index 7cb1c35..b432bbc 100644 --- a/tuned/exports/dbus_exporter.py +++ b/tuned/exports/dbus_exporter.py @@ -9,7 +9,7 @@ import signal import tuned.logs import tuned.consts as consts from tuned.utils.polkit import polkit -from gi.repository import GObject as gobject +from gi.repository import GLib log = tuned.logs.get() @@ -24,7 +24,6 @@ class DBusExporter(interfaces.ExporterInterface): """ def __init__(self, bus_name, interface_name, object_name): - gobject.threads_init() dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) self._dbus_object_cls = None @@ -42,7 +41,7 @@ class DBusExporter(interfaces.ExporterInterface): # dirty hack that fixes KeyboardInterrupt handling # the hack is needed because PyGObject / GTK+-3 developers are morons signal_handler = signal.getsignal(signal.SIGINT) - self._main_loop = gobject.MainLoop() + self._main_loop = GLib.MainLoop() signal.signal(signal.SIGINT, signal_handler) @property