mirror of
https://gitlab.com/octospacc/TelegramIndex-Fork.git
synced 2025-06-05 22:09:12 +02:00
make this check a generic one so that all the required env variables are checked before continuing.
Co-authored-by: Christy Roys <royschristy@gmail.com>
This commit is contained in:
12
run-repl.py
12
run-repl.py
@ -15,9 +15,15 @@ def runSetup():
|
|||||||
f"\nCopy your {missing} and save it into Secrets(Environment variables) Sidebar!\n"
|
f"\nCopy your {missing} and save it into Secrets(Environment variables) Sidebar!\n"
|
||||||
)
|
)
|
||||||
|
|
||||||
api_id = os.getenv("API_ID")
|
req_env_vars = ["API_ID", "API_HASH", "INDEX_SETTINGS"]
|
||||||
if api_id is None:
|
misssing_envs = False
|
||||||
alert()
|
for env_var in req_env_vars:
|
||||||
|
env_value = os.getenv(env_var )
|
||||||
|
if env_value is None:
|
||||||
|
misssing_envs = True
|
||||||
|
alert(env_var)
|
||||||
|
|
||||||
|
if misssing_envs:
|
||||||
return
|
return
|
||||||
|
|
||||||
session_string = os.getenv("SESSION_STRING")
|
session_string = os.getenv("SESSION_STRING")
|
||||||
|
Reference in New Issue
Block a user