summarylogtreecommitdiffstats
path: root/pkgdistcache-client
diff options
context:
space:
mode:
authorEric Anderson2018-08-11 09:17:31 -0700
committerEric Anderson2018-08-11 09:17:31 -0700
commit921ae17720b737c1ca46d661d8ed13cabc090fc3 (patch)
treede17ac1bcdeb7bd595ceff1a699fa33a93568ccf /pkgdistcache-client
parentae8d75ee518a7bd10dfb18f8faa3a86a8d76a7ad (diff)
downloadaur-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-xpkgdistcache-client4
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',