changeset 748:a0f4a80a6536

core: bug fix for serverDiscoItems (bad use of addCallbacks)
author souliane <souliane@mailoo.org>
date Mon, 16 Dec 2013 14:36:38 +0100
parents 5aff0beddb28
children 192b804ee446
files src/core/sat_main.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/core/sat_main.py	Mon Dec 16 14:35:26 2013 +0100
+++ b/src/core/sat_main.py	Mon Dec 16 14:36:38 2013 +0100
@@ -708,7 +708,7 @@
 
         def errback(failure, method, jid_, profile):
             # the target server is not reachable
-            logging.error("disco.%s on %s failed! [%s]" % (method.func_name, jid_, profile))
+            logging.error("disco.%s on %s failed! [%s]" % (method.func_name, jid_.userhost(), profile))
             logging.error("reason: %s" % failure.getErrorMessage())
             if method == disco.requestInfo:
                 features = self.memory.server_features.setdefault(profile, {})
@@ -727,7 +727,7 @@
                 return d2.addCallback(haveItemsFeature)
 
         d = disco.requestInfo(jid_).addCallback(self.serverDisco, jid_, profile)
-        d.addCallbacks(callback, errback, [], [disco.requestInfo, jid_, profile])
+        d.addCallbacks(callback, errback, [], errbackArgs=[disco.requestInfo, jid_, profile])
         return d
 
     ## callbacks ##