Skip to content

Commit

Permalink
Fix bugs of search_friends and test_connect
Browse files Browse the repository at this point in the history
  • Loading branch information
littlecodersh committed Feb 14, 2017
1 parent 35bac6b commit 199200d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions itchat/components/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ def web_init(self):
utils.emoji_formatter(dic['User'], 'NickName')
self.loginInfo['InviteStartCount'] = int(dic['InviteStartCount'])
self.loginInfo['User'] = utils.struct_friend_info(dic['User'])
self.memberList.append(self.loginInfo['User'])
self.loginInfo['SyncKey'] = dic['SyncKey']
self.loginInfo['synckey'] = '|'.join(['%s_%s' % (item['Key'], item['Val'])
for item in dic['SyncKey']['List']])
Expand Down
2 changes: 1 addition & 1 deletion itchat/config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os, platform

VERSION = '1.2.22'
VERSION = '1.2.23'
BASE_URL = 'https://login.weixin.qq.com'
OS = platform.system() #Windows, Linux, Darwin
DIR = os.getcwd()
Expand Down
4 changes: 2 additions & 2 deletions itchat/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ def test_connect(retryTime=5):
for i in range(retryTime):
try:
r = requests.get(config.BASE_URL)
return True
except:
if i == retryTime-1:
if i == retryTime - 1:
logger.error(traceback.format_exc())
return False
return True

0 comments on commit 199200d

Please sign in to comment.