diff options
author | Eric Anderson | 2018-08-11 09:17:31 -0700 |
---|---|---|
committer | Eric Anderson | 2018-08-11 09:17:31 -0700 |
commit | 921ae17720b737c1ca46d661d8ed13cabc090fc3 (patch) | |
tree | de17ac1bcdeb7bd595ceff1a699fa33a93568ccf /pkgdistcache-client | |
parent | ae8d75ee518a7bd10dfb18f8faa3a86a8d76a7ad (diff) | |
download | aur-921ae17720b737c1ca46d661d8ed13cabc090fc3.tar.gz |
Convert to explicit DBusGMainLoop
This fixes the warning:
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
Diffstat (limited to 'pkgdistcache-client')
-rwxr-xr-x | pkgdistcache-client | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkgdistcache-client b/pkgdistcache-client index dec92223daa2..8bc7d8ad6680 100755 --- a/pkgdistcache-client +++ b/pkgdistcache-client @@ -17,11 +17,13 @@ import time import avahi import dbus -import dbus.glib +from dbus.mainloop.glib import DBusGMainLoop import requests import xdg.BaseDirectory from gi.repository import GLib +DBusGMainLoop(set_as_default=True) + colors = { 'none': '\033[0m', 'black': '\033[0;30m', 'bold_black': '\033[1;30m', |