Dropped deprecated/unneeded glib code
Resolves: rhbz#1369044 Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This commit is contained in:
parent
83d573727b
commit
bbfc2c6e54
2 changed files with 2 additions and 6 deletions
|
|
@ -24,9 +24,6 @@ class DBusController(object):
|
||||||
def _init_proxy(self):
|
def _init_proxy(self):
|
||||||
try:
|
try:
|
||||||
if self._proxy is None:
|
if self._proxy is None:
|
||||||
# Probably not needed for PyGObject 3.10.2+
|
|
||||||
GObject.threads_init()
|
|
||||||
|
|
||||||
DBusGMainLoop(set_as_default=True)
|
DBusGMainLoop(set_as_default=True)
|
||||||
self._main_loop = GLib.MainLoop()
|
self._main_loop = GLib.MainLoop()
|
||||||
bus = dbus.SystemBus()
|
bus = dbus.SystemBus()
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import signal
|
||||||
import tuned.logs
|
import tuned.logs
|
||||||
import tuned.consts as consts
|
import tuned.consts as consts
|
||||||
from tuned.utils.polkit import polkit
|
from tuned.utils.polkit import polkit
|
||||||
from gi.repository import GObject as gobject
|
from gi.repository import GLib
|
||||||
|
|
||||||
log = tuned.logs.get()
|
log = tuned.logs.get()
|
||||||
|
|
||||||
|
|
@ -24,7 +24,6 @@ class DBusExporter(interfaces.ExporterInterface):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, bus_name, interface_name, object_name):
|
def __init__(self, bus_name, interface_name, object_name):
|
||||||
gobject.threads_init()
|
|
||||||
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
|
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
|
||||||
|
|
||||||
self._dbus_object_cls = None
|
self._dbus_object_cls = None
|
||||||
|
|
@ -42,7 +41,7 @@ class DBusExporter(interfaces.ExporterInterface):
|
||||||
# dirty hack that fixes KeyboardInterrupt handling
|
# dirty hack that fixes KeyboardInterrupt handling
|
||||||
# the hack is needed because PyGObject / GTK+-3 developers are morons
|
# the hack is needed because PyGObject / GTK+-3 developers are morons
|
||||||
signal_handler = signal.getsignal(signal.SIGINT)
|
signal_handler = signal.getsignal(signal.SIGINT)
|
||||||
self._main_loop = gobject.MainLoop()
|
self._main_loop = GLib.MainLoop()
|
||||||
signal.signal(signal.SIGINT, signal_handler)
|
signal.signal(signal.SIGINT, signal_handler)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue