diff --git a/sat/plugins/plugin_xep_0363.py b/sat/plugins/plugin_xep_0363.py index c6d62ee4..f4261260 100644 --- a/sat/plugins/plugin_xep_0363.py +++ b/sat/plugins/plugin_xep_0363.py @@ -24,7 +24,6 @@ from urllib import parse from wokkel import disco, iwokkel from zope.interface import implementer from twisted.words.protocols.jabber import jid, xmlstream, error -from twisted.words.xish import domish from twisted.internet import reactor from twisted.internet import defer from twisted.web import client as http_client @@ -375,13 +374,17 @@ class XEP_0363: try: slot = handler.callback(client, request) except error.StanzaError as e: - log.warning(f"a stanza error has been raised while processing HTTP Upload of request: {e}") + log.warning( + "a stanza error has been raised while processing HTTP Upload of " + f"request: {e}" + ) if err is None: # we keep the first error to return its condition later, # if no other callback handle the request err = e - if slot: - break + else: + if slot: + break else: log.warning( _("no service can handle HTTP Upload request: {elt}")