Skip to content

Commit

Permalink
test_sync_check 修复
Browse files Browse the repository at this point in the history
test_sync_check 兼容
  • Loading branch information
vivre90 authored Oct 12, 2016
1 parent fd47c0d commit d890799
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions wxbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1116,14 +1116,15 @@ def status_notify(self):
return dic['BaseResponse']['Ret'] == 0

def test_sync_check(self):
for host in ['webpush.wx', 'webpush2.wx2','webpush.weixin', 'webpush2.weixin2']:
self.sync_host = host
try:
retcode = self.sync_check()[0]
except:
retcode == -1
if retcode == '0':
return True
for host1 in ['webpush', 'webpush2']:
for host2 in ['weixin','weixin2','wx','wx2']:
self.sync_host = host1+host2
try:
retcode = self.sync_check()[0]
except:
retcode == -1
if retcode == '0':
return True
return False

def sync_check(self):
Expand Down

0 comments on commit d890799

Please sign in to comment.