mirror of
https://github.com/VigorousPro/TS3-Translation_zh-CN
synced 2024-12-29 18:55:08 +08:00
[skip ci] fix bug
判断返回值为空需要使用not而不是xx == ""
This commit is contained in:
parent
0fde45f958
commit
1daf079a18
2
maker.py
2
maker.py
@ -84,7 +84,7 @@ def telegram_push(string, debug=0):
|
||||
querystring = parse.urlencode({"text": string.encode('utf-8')})
|
||||
tg_api = os.getenv('TG_API')
|
||||
group_id = os.getenv('TG_GROUP_ID')
|
||||
if tg_api == "" or group_id == "":
|
||||
if not tg_api or not group_id:
|
||||
if debug:
|
||||
print("Telegram api key or chat(group) id not found.")
|
||||
print("You need to set TG_API and TG_GROUP_ID in the environment variable.")
|
||||
|
Loading…
Reference in New Issue
Block a user