File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1116,9 +1116,12 @@ def status_notify(self):
11161116 return dic ['BaseResponse' ]['Ret' ] == 0
11171117
11181118 def test_sync_check (self ):
1119- for host in ['webpush' , 'webpush2' ]:
1119+ for host in ['webpush.wx ' , 'webpush2.wx2' , 'webpush.weixin' , 'webpush2.weixin2 ' ]:
11201120 self .sync_host = host
1121- retcode = self .sync_check ()[0 ]
1121+ try :
1122+ retcode = self .sync_check ()[0 ]
1123+ except :
1124+ retcode == - 1
11221125 if retcode == '0' :
11231126 return True
11241127 return False
@@ -1133,7 +1136,7 @@ def sync_check(self):
11331136 'synckey' : self .sync_key_str ,
11341137 '_' : int (time .time ()),
11351138 }
1136- url = 'https://' + self .sync_host + '.wx. qq.com/cgi-bin/mmwebwx-bin/synccheck?' + urllib .urlencode (params )
1139+ url = 'https://' + self .sync_host + '.qq.com/cgi-bin/mmwebwx-bin/synccheck?' + urllib .urlencode (params )
11371140 try :
11381141 r = self .session .get (url , timeout = 60 )
11391142 r .encoding = 'utf-8'
You can’t perform that action at this time.
0 commit comments