Reformatted code base using black.
This commit is contained in:
parent
56319cbad3
commit
53fdaa9d09
1 changed files with 12604 additions and 8966 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue