From d75bbaec4c6c2202b57c1279355412ed82f824c7 Mon Sep 17 00:00:00 2001 From: Goffi Date: Tue, 4 Feb 2020 19:59:42 +0100 Subject: [PATCH] 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. --- sat/memory/disco.py | 2 +- sat/plugins/plugin_misc_text_commands.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sat/memory/disco.py b/sat/memory/disco.py index 8b1e5b9e..ef351c50 100755 --- a/sat/memory/disco.py +++ b/sat/memory/disco.py @@ -139,7 +139,7 @@ class Discovery(object): """ 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=""): diff --git a/sat/plugins/plugin_misc_text_commands.py b/sat/plugins/plugin_misc_text_commands.py index 0805e909..b602ee61 100644 --- a/sat/plugins/plugin_misc_text_commands.py +++ b/sat/plugins/plugin_misc_text_commands.py @@ -371,12 +371,12 @@ class TextCommands(object): 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