From be5f98bbdb4f1103282c0be3e39add428ecab1a6 Mon Sep 17 00:00:00 2001 From: Dmitry Shachnev Date: Wed, 10 Feb 2016 14:30:41 +0300 Subject: [PATCH] mock: Port to modern pygobject API https://bugzilla.gnome.org/show_bug.cgi?id=761834 --- libsecret/mock/service.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libsecret/mock/service.py b/libsecret/mock/service.py index d8f7e66..f75ef43 100644 --- a/libsecret/mock/service.py +++ b/libsecret/mock/service.py @@ -24,7 +24,7 @@ import hkdf import dbus import dbus.service import dbus.glib -import gobject +from gi.repository import GLib COLLECTION_PREFIX = "/org/freedesktop/secrets/collection/" @@ -146,7 +146,7 @@ class SecretPrompt(dbus.service.Object): def Prompt(self, window_id): if self.action: self.result = self.action() - gobject.timeout_add(self.delay * 1000, self._complete) + GLib.timeout_add(self.delay * 1000, self._complete) @dbus.service.method('org.freedesktop.Secret.Prompt') def Dismiss(self): @@ -525,7 +525,7 @@ class SecretService(dbus.service.Object): self.set_alias('session', collection) def listen(self): - loop = gobject.MainLoop() + loop = GLib.MainLoop() name = self.bus.get_unique_name() if not name: raise NameError("No unique name available")