mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
pep8
This commit is contained in:
parent
a9e2b9ec16
commit
1c99934b28
@ -72,7 +72,7 @@ class MsisdnPasswordRequestTokenRestServlet(RestServlet):
|
|||||||
def on_POST(self, request):
|
def on_POST(self, request):
|
||||||
body = parse_json_object_from_request(request)
|
body = parse_json_object_from_request(request)
|
||||||
|
|
||||||
assert_params_in_request(body,[
|
assert_params_in_request(body, [
|
||||||
'id_server', 'client_secret',
|
'id_server', 'client_secret',
|
||||||
'country', 'phone_number', 'send_attempt',
|
'country', 'phone_number', 'send_attempt',
|
||||||
])
|
])
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
import phonenumbers
|
import phonenumbers
|
||||||
from synapse.api.errors import SynapseError
|
from synapse.api.errors import SynapseError
|
||||||
|
|
||||||
|
|
||||||
def phone_number_to_msisdn(country, number):
|
def phone_number_to_msisdn(country, number):
|
||||||
try:
|
try:
|
||||||
phoneNumber = phonenumbers.parse(number, country)
|
phoneNumber = phonenumbers.parse(number, country)
|
||||||
|
Loading…
Reference in New Issue
Block a user