Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xaoyaoo committed Aug 7, 2024
1 parent 6359464 commit 02d4eb4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions pywxdump/api/rjson.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ def ReJson(code: int, body: [dict, list] = None, msg: str = None, error: str = N
rjson['msg'] = msg
if code != 0:
stack = traceback.extract_stack()
project_stack = [frame for frame in stack if "pywxdump" in frame.filename.lower() and
any(keyword in frame.filename for keyword in
["api", "db", "wx_core", "analyzer", "ui", "cli", "server"])]
project_stack = [frame for frame in stack]
# 格式化调用栈信息
formatted_stack = ''.join(traceback.format_list(project_stack))
# stack_trace = ''.join(traceback.format_stack())
Expand Down
2 changes: 1 addition & 1 deletion pywxdump/db/dbMicro.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def get_labels(self, id_is_key=True):
:return:
"""
if not self.table_exist.get("ContactLabel", False):
return []
return {}
sql = "SELECT LabelId, LabelName FROM ContactLabel ORDER BY LabelName ASC;"
result = self.execute(sql)
if not result:
Expand Down

0 comments on commit 02d4eb4

Please sign in to comment.