mirror of
https://github.com/hlt1995/qlScripts.git
synced 2026-11-05 23:26:44 +08:00
Check for tc_cookie and exit if not set
Added a check for tc_cookie environment variable and exit if not set.
This commit is contained in:
1 parent
ef97862b2b
commit
cc4bafbd46
1 file changed
+3
-1
+3
-1
@@ -46,7 +46,9 @@ def get_env(env_name, separator="@"):
|
|||||||
notify_message = "\n"
|
notify_message = "\n"
|
||||||
|
|
||||||
tc_cookies = get_env("tc_cookie")
|
tc_cookies = get_env("tc_cookie")
|
||||||
|
if not tc_cookies:
|
||||||
|
print("❌ 未检测到账号信息,请检查环境变量 tc_cookie 是否正确设置")
|
||||||
|
exit(0)
|
||||||
|
|
||||||
class Tclx:
|
class Tclx:
|
||||||
def __init__(self, cookie):
|
def __init__(self, cookie):
|
||||||
|
|||||||
Reference in new issue
Block a user