[bug fix]
This commit is contained in:
parent
c878360f70
commit
d9a06c11cd
@ -11,10 +11,8 @@ http://wxpusher.zjiecode.com/
|
|||||||
|
|
||||||
from threading import Lock, Thread
|
from threading import Lock, Thread
|
||||||
import requests
|
import requests
|
||||||
import json
|
|
||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
from urllib.parse import urlencode
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
global wechat_lock
|
global wechat_lock
|
||||||
@ -58,7 +56,7 @@ class wechat_thread(Thread):
|
|||||||
try:
|
try:
|
||||||
response = requests.post(self.request_url, json=params).json()
|
response = requests.post(self.request_url, json=params).json()
|
||||||
if not response.get('success', False):
|
if not response.get('success', False):
|
||||||
print(response)
|
print(response)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("{} wechat_thread sent failed! ex:{},trace:{}".format(datetime.now(), str(e), traceback.format_exc()),
|
print("{} wechat_thread sent failed! ex:{},trace:{}".format(datetime.now(), str(e), traceback.format_exc()),
|
||||||
file=sys.stderr)
|
file=sys.stderr)
|
||||||
@ -74,7 +72,7 @@ def send_wx_msg(content=''):
|
|||||||
|
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
if len(text) == 0:
|
if len(content) == 0:
|
||||||
return
|
return
|
||||||
|
|
||||||
t = wechat_thread(uid=UID, content=content)
|
t = wechat_thread(uid=UID, content=content)
|
||||||
|
Loading…
Reference in New Issue
Block a user