Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BillLi
ItChat
提交
71d5c572
I
ItChat
项目概览
BillLi
/
ItChat
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
I
ItChat
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
71d5c572
编写于
1月 23, 2017
作者:
L
LittleCoder
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Adjust logging level [BR#210: binderclip]
上级
d41c0160
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
5 addition
and
4 deletion
+5
-4
itchat/components/login.py
itchat/components/login.py
+3
-3
itchat/components/messages.py
itchat/components/messages.py
+1
-1
itchat/components/register.py
itchat/components/register.py
+1
-0
未找到文件。
itchat/components/login.py
浏览文件 @
71d5c572
...
...
@@ -27,7 +27,7 @@ def load_login(core):
def
login
(
self
,
enableCmdQR
=
False
,
picDir
=
None
,
qrCallback
=
None
,
loginCallback
=
None
,
exitCallback
=
None
):
if
self
.
alive
:
logger
.
debu
g
(
'itchat has already logged in.'
)
logger
.
warnin
g
(
'itchat has already logged in.'
)
return
while
1
:
for
getCount
in
range
(
10
):
...
...
@@ -175,7 +175,7 @@ def web_init(self):
self
.
storageClass
.
nickName
=
dic
[
'User'
][
'NickName'
]
# deal with contact list returned when init
contactList
=
dic
.
get
(
'ContactList'
,
[])
contactList
.
append
(
self
.
loginInfo
[
'User'
])
contactList
.
append
(
self
.
loginInfo
[
'User'
])
# self contact should be added first
chatroomList
,
otherList
=
[],
[]
for
m
in
contactList
:
if
m
[
'Sex'
]
!=
0
:
...
...
@@ -233,7 +233,7 @@ def start_receiving(self, exitCallback=None, getReceivingFnOnly=False):
retryCount
=
0
except
:
retryCount
+=
1
logger
.
debug
(
traceback
.
format_exc
())
logger
.
error
(
traceback
.
format_exc
())
if
self
.
receivingRetryCount
<
retryCount
:
self
.
alive
=
False
else
:
...
...
itchat/components/messages.py
浏览文件 @
71d5c572
...
...
@@ -180,7 +180,7 @@ def produce_msg(core, msgList):
'Type'
:
'Useless'
,
'Text'
:
'UselessMsg'
,
}
else
:
logger
.
debug
(
'
MsgType Unknown
: %s
\n
%s'
%
(
m
[
'MsgType'
],
str
(
m
)))
logger
.
debug
(
'
Useless message received
: %s
\n
%s'
%
(
m
[
'MsgType'
],
str
(
m
)))
msg
=
{
'Type'
:
'Useless'
,
'Text'
:
'UselessMsg'
,
}
...
...
itchat/components/register.py
浏览文件 @
71d5c572
...
...
@@ -66,6 +66,7 @@ def configured_reply(self):
r
=
replyFn
(
msg
)
if
r
is
not
None
:
self
.
send
(
r
,
msg
.
get
(
'FromUserName'
))
except
:
logger
.
warning
(
'An error occurred in registered function, use `itchat.run(debug=True)` to show detailed information'
)
logger
.
debug
(
traceback
.
format_exc
())
def
msg_register
(
self
,
msgType
,
isFriendChat
=
False
,
isGroupChat
=
False
,
isMpChat
=
False
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录