fix bug again...

忘记同步更改惹
This commit is contained in:
Jiting 2019-02-15 19:00:20 +08:00
parent f53e9e90ae
commit 6385301062
No known key found for this signature in database
GPG Key ID: B68ED772995769D6

View File

@ -89,7 +89,7 @@ def telegram_push(string, debug=0):
querystring = parse.urlencode({"text": string.encode('utf-8')}) querystring = parse.urlencode({"text": string.encode('utf-8')})
tg_api = os.getenv('TG_API') tg_api = os.getenv('TG_API')
group_id = os.getenv('TG_GROUP_ID') group_id = os.getenv('TG_GROUP_ID')
if tg_api == "" or group_id == "": if not tg_api or not group_id:
if debug: if debug:
print("Telegram api key or chat(group) id not found.") 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.") print("You need to set TG_API and TG_GROUP_ID in the environment variable.")