1
0
Fork 0

Dropped deprecated/unneeded glib code

Resolves: rhbz#1369044

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This commit is contained in:
Jaroslav Škarvada 2016-08-23 15:41:52 +02:00
parent 83d573727b
commit bbfc2c6e54
2 changed files with 2 additions and 6 deletions

View file

@ -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()

View file

@ -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