Speed up create import pins script.
This commit is contained in:
parent
0520a84b9e
commit
03215ded11
@ -3,6 +3,7 @@ import argparse
|
|||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
import uuid
|
||||||
|
|
||||||
# third-party imports
|
# third-party imports
|
||||||
import bcrypt
|
import bcrypt
|
||||||
@ -83,7 +84,7 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
phone_object = phonenumbers.parse(u.tel)
|
phone_object = phonenumbers.parse(u.tel)
|
||||||
phone = phonenumbers.format_number(phone_object, phonenumbers.PhoneNumberFormat.E164)
|
phone = phonenumbers.format_number(phone_object, phonenumbers.PhoneNumberFormat.E164)
|
||||||
password_hash = generate_password_hash()
|
password_hash = uuid.uuid4().hex
|
||||||
pins_file.write(f'{phone},{password_hash}\n')
|
pins_file.write(f'{phone},{password_hash}\n')
|
||||||
logg.info(f'Writing phone: {phone}, password_hash: {password_hash}')
|
logg.info(f'Writing phone: {phone}, password_hash: {password_hash}')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user