Reformatted code base using black.

This commit is contained in:
Goffi 2024-06-19 18:44:57 +02:00
commit 53fdaa9d09

View file

@ -96,18 +96,21 @@ class XEP_0070(object):
auth_url = auth_elt["url"]
self._dictRequest[client] = (auth_id, auth_method, auth_url, stanzaType, elt)
title = D_("Auth confirmation")
message = D_("{auth_url} needs to validate your identity, do you agree?\n"
"Validation code : {auth_id}\n\n"
"Please check that this code is the same as on {auth_url}"
).format(auth_url=auth_url, auth_id=auth_id)
d = xml_tools.defer_confirm(self.host, message=message, title=title,
profile=client.profile)
message = D_(
"{auth_url} needs to validate your identity, do you agree?\n"
"Validation code : {auth_id}\n\n"
"Please check that this code is the same as on {auth_url}"
).format(auth_url=auth_url, auth_id=auth_id)
d = xml_tools.defer_confirm(
self.host, message=message, title=title, profile=client.profile
)
d.addCallback(self._auth_request_callback, client)
def _auth_request_callback(self, authorized, client):
try:
auth_id, auth_method, auth_url, stanzaType, elt = self._dictRequest.pop(
client)
client
)
except KeyError:
authorized = False