diff sat_frontends/bridge/pb.py @ 2892:82b781c46841

core: added a rosterResync method to bridge: rosterResync do a full resynchronisation of roster with server. This should not be needed, but may be useful if user suspect a sync issue for whatever reason.
author Goffi <goffi@goffi.org>
date Sun, 07 Apr 2019 18:49:41 +0200
parents 003b8b4b56a7
children ab2696e34d29
line wrap: on
line diff
--- a/sat_frontends/bridge/pb.py	Sun Apr 07 18:47:17 2019 +0200
+++ b/sat_frontends/bridge/pb.py	Sun Apr 07 18:49:41 2019 +0200
@@ -526,6 +526,14 @@
             errback = self._generic_errback
         d.addErrback(errback)
 
+    def rosterResync(self, profile_key="@DEFAULT@", callback=None, errback=None):
+        d = self.root.callRemote("rosterResync", profile_key)
+        if callback is not None:
+            d.addCallback(lambda __: callback())
+        if errback is None:
+            errback = self._generic_errback
+        d.addErrback(errback)
+
     def saveParamsTemplate(self, filename, callback=None, errback=None):
         d = self.root.callRemote("saveParamsTemplate", filename)
         if callback is not None: