pushbear conf fix

pull/569/head
文贤平 2019-09-02 15:21:06 +08:00
parent 66b43cfc1d
commit 689e018f54
2 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,7 @@
#### 项目使用说明 #### 项目使用说明
- 可以配置邮箱,可以配置可以不配置,配置邮箱的格式在[配置](TickerConfig.py)里面可以看到ex - 可以配置邮箱,可以配置可以不配置,配置邮箱的格式在[配置](TickerConfig.py)里面可以看到ex
- 可以配置server酱提醒推荐 [配置教程](https://www.jianshu.com/p/8d10b5b9c4e3) - 可以配置server酱提醒推荐 [配置教程](https://www.jianshu.com/p/8d10b5b9c4e3)
- 配置[配置](TickerConfig.py)文件的时候,需注意空格和遵循yaml语法格式 - 配置[配置](TickerConfig.py)文件的时候,需注意空格和遵循python语法格式
#### 项目开始 #### 项目开始
- 服务器启动: - 服务器启动:

View File

@ -12,11 +12,11 @@ def sendPushBear(msg):
:param str: 通知内容 content :param str: 通知内容 content
:return: :return:
""" """
if TickerConfig.PUSHBEAR_CONF["is_pushbear"] and TickerConfig.PUSHBEAR_CONF["pushbear_conf"]["send_key"].strip() != "": if TickerConfig.PUSHBEAR_CONF["is_pushbear"] and TickerConfig.PUSHBEAR_CONF["send_key"].strip() != "":
try: try:
sendPushBearUrls = urls.get("Pushbear") sendPushBearUrls = urls.get("Pushbear")
data = { data = {
"sendkey": TickerConfig.PUSHBEAR_CONF["pushbear_conf"]["send_key"].strip(), "sendkey": TickerConfig.PUSHBEAR_CONF["send_key"].strip(),
"text": "易行购票成功通知", "text": "易行购票成功通知",
"desp": msg "desp": msg
} }