changeset 3156:0318802dfe28

core (memory/disco): fixed checkFeature return Failure: it seems that instanciating a Failure with a class name is not working anymore, so the exceptions.FeatureNotFound is instanciated now.
author Goffi <goffi@goffi.org>
date Tue, 04 Feb 2020 19:59:42 +0100 (2020-02-04)
parents 3a8755fdc78d
children 8b4354b5c05f
files sat/memory/disco.py sat/plugins/plugin_misc_text_commands.py
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/sat/memory/disco.py	Tue Feb 04 18:24:15 2020 +0100
+++ b/sat/memory/disco.py	Tue Feb 04 19:59:42 2020 +0100
@@ -139,7 +139,7 @@
         """
         disco_infos = yield self.getInfos(client, jid_, node)
         if not feature in disco_infos.features:
-            raise failure.Failure(exceptions.FeatureNotFound)
+            raise failure.Failure(exceptions.FeatureNotFound())
 
     @defer.inlineCallbacks
     def checkFeatures(self, client, features, jid_=None, identity=None, node=""):
--- a/sat/plugins/plugin_misc_text_commands.py	Tue Feb 04 18:24:15 2020 +0100
+++ b/sat/plugins/plugin_misc_text_commands.py	Tue Feb 04 19:59:42 2020 +0100
@@ -371,12 +371,12 @@
         whois_msg = [_("whois for %(jid)s") % {"jid": target_jid}]
 
         d = defer.succeed(None)
-        for ignore, callback in self._whois:
+        for __, callback in self._whois:
             d.addCallback(
-                lambda ignore: callback(client, whois_msg, mess_data, target_jid)
+                lambda __: callback(client, whois_msg, mess_data, target_jid)
             )
 
-        def feedBack(ignore):
+        def feedBack(__):
             self.feedBack(client, "\n".join(whois_msg), mess_data)
             return False