Skip to content

Commit 71eeb0b

Browse files
authored
Merge pull request liuwons#137 from vivre90/patch-5
sync接口兼容 修复
2 parents 906a49d + d985203 commit 71eeb0b

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

wxbot.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,14 +1116,15 @@ def status_notify(self):
11161116
return dic['BaseResponse']['Ret'] == 0
11171117

11181118
def test_sync_check(self):
1119-
for host in ['webpush.wx', 'webpush2.wx2','webpush.weixin', 'webpush2.weixin2']:
1120-
self.sync_host = host
1121-
try:
1122-
retcode = self.sync_check()[0]
1123-
except:
1124-
retcode == -1
1125-
if retcode == '0':
1126-
return True
1119+
for host1 in ['webpush.', 'webpush2.']:
1120+
for host2 in ['weixin','weixin2','wx','wx2']:
1121+
self.sync_host = host1+host2
1122+
try:
1123+
retcode = self.sync_check()[0]
1124+
except:
1125+
retcode == -1
1126+
if retcode == '0':
1127+
return True
11271128
return False
11281129

11291130
def sync_check(self):

0 commit comments

Comments
 (0)