changeset 1355:33a21f06551d frontends_multi_profiles

core: fixes bug introduced by 1262 (f8a8434dbac7) in SAT.delContact
author souliane <souliane@mailoo.org>
date Fri, 06 Mar 2015 16:06:38 +0100
parents 14fc88275e65
children c01cbd8fc8dd
files src/core/sat_main.py
diffstat 1 files changed, 2 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/core/sat_main.py	Fri Mar 06 15:24:45 2015 +0100
+++ b/src/core/sat_main.py	Fri Mar 06 16:06:38 2015 +0100
@@ -638,15 +638,8 @@
         """Remove contact from roster list"""
         profile = self.memory.getProfileName(profile_key)
         assert profile
-        d1 = self.profiles[profile].roster.removeItem(to_jid)
-        d2 = self.profiles[profile].presence.unsubscribe(to_jid)
-        d_list = defer.DeferredList([d1, d2])
-        def check_result(list_result):
-            for success, value in list_result:
-                if not success:
-                    raise value
-        d_list.addCallback(check_result)
-        return d_list
+        self.profiles[profile].presence.unsubscribe(to_jid)  # is not asynchronous
+        return self.profiles[profile].roster.removeItem(to_jid)
 
     ## Discovery ##
     # discovery methods are shortcuts to self.memory.disco