style: format session_string_generator.py with black
This commit is contained in:
parent
c39cde69f7
commit
03f3321942
1 changed files with 2 additions and 6 deletions
|
|
@ -69,9 +69,7 @@ def _phone_login(client: TelegramClient) -> None:
|
||||||
try:
|
try:
|
||||||
client.send_code_request(phone)
|
client.send_code_request(phone)
|
||||||
except errors.FloodWaitError as e:
|
except errors.FloodWaitError as e:
|
||||||
print(
|
print(f"\nFlood wait error; you must wait {e.seconds} seconds before trying again.")
|
||||||
f"\nFlood wait error; you must wait {e.seconds} seconds before trying again."
|
|
||||||
)
|
|
||||||
client.disconnect()
|
client.disconnect()
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
except errors.PhoneNumberInvalidError:
|
except errors.PhoneNumberInvalidError:
|
||||||
|
|
@ -97,9 +95,7 @@ def main() -> None:
|
||||||
|
|
||||||
if not API_ID or not API_HASH:
|
if not API_ID or not API_HASH:
|
||||||
print("Error: TELEGRAM_API_ID and TELEGRAM_API_HASH must be set in .env file")
|
print("Error: TELEGRAM_API_ID and TELEGRAM_API_HASH must be set in .env file")
|
||||||
print(
|
print("Create an .env file with your credentials from https://my.telegram.org/apps")
|
||||||
"Create an .env file with your credentials from https://my.telegram.org/apps"
|
|
||||||
)
|
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue