From 3630149afad092294214fb1393aa8a241865b73c Mon Sep 17 00:00:00 2001 From: Jisan <66010486+Jisan09@users.noreply.github.com> Date: Fri, 28 Apr 2023 20:12:34 +0530 Subject: Update __init__.py --- forefront/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'forefront/__init__.py') diff --git a/forefront/__init__.py b/forefront/__init__.py index 615057f8..30aae844 100644 --- a/forefront/__init__.py +++ b/forefront/__init__.py @@ -39,11 +39,11 @@ class Account: } ) - try: - trace_token = response.json()['response']['id'] - if logging: print(trace_token) - except KeyError: - return 'Failed to create account!' + try: + trace_token = response.json()['response']['id'] + if logging: print(trace_token) + except KeyError: + return 'Failed to create account!' response = client.post( f"https://clerk.forefront.ai/v1/client/sign_ups/{trace_token}/prepare_verification?_clerk_js_version=4.32.6", -- cgit v1.2.3 From 88b4ebba3de26c0fdbc5f5704abe126d42eba559 Mon Sep 17 00:00:00 2001 From: 0dminnimda <0dminnimda@gmail.com> Date: Fri, 28 Apr 2023 19:31:51 +0300 Subject: Print the mail messages only when logging --- forefront/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'forefront/__init__.py') diff --git a/forefront/__init__.py b/forefront/__init__.py index 30aae844..03f24729 100644 --- a/forefront/__init__.py +++ b/forefront/__init__.py @@ -60,7 +60,7 @@ class Account: while True: sleep(1) for _ in mail.fetch_inbox(): - print(mail.get_message_content(_["id"])) + if logging: print(mail.get_message_content(_["id"])) mail_token = match(r"(\d){5,6}", mail.get_message_content(_["id"])).group(0) if mail_token: -- cgit v1.2.3