From a47895131484cfb5d3b6bbbce1e1f223d69c5dda Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Tue, 27 Aug 2019 22:34:08 +0200 Subject: [PATCH] Use dbus.mainloop.glib.DBusGMainLoop() instead of dbus.glib Fixes: /usr/bin/sealert:32: DeprecationWarning: Importing dbus.glib to use the GLib main loop with dbus-python is deprecated. Instead, use this sequence: from dbus.mainloop.glib import DBusGMainLoop DBusGMainLoop(set_as_default=True) import dbus.glib --- framework/src/sealert | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/framework/src/sealert b/framework/src/sealert index 4934df4..42dc976 100755 --- a/framework/src/sealert +++ b/framework/src/sealert @@ -29,7 +29,6 @@ from gi.repository import GObject, GLib GLib.set_prgname('setroubleshoot') import dbus -import dbus.glib import dbus.service import errno as Errno import gettext @@ -42,6 +41,9 @@ import fcntl import sys import slip.dbus.service +from dbus.mainloop.glib import DBusGMainLoop +DBusGMainLoop(set_as_default=True) + from setroubleshoot.config import parse_config_setting, get_config domain = get_config('general', 'i18n_text_domain') kwargs = {} -- 2.23.0