修复部分bug #34
This commit is contained in:
parent
69ee8e77c1
commit
11860acbac
@ -237,7 +237,9 @@ class MainAll():
|
||||
wxid = user.get("wxid", None)
|
||||
|
||||
WxDbPath = get_wechat_db('all', None, wxid=wxid, is_logging=True) # 获取微信数据库路径
|
||||
|
||||
if isinstance(WxDbPath, str): # 如果返回的是字符串,则表示出错
|
||||
print(WxDbPath)
|
||||
return
|
||||
wxdbpaths = [path for user_dir in WxDbPath.values() for paths in user_dir.values() for path in paths]
|
||||
if len(wxdbpaths) == 0:
|
||||
print("[-] 未获取到数据库路径")
|
||||
|
@ -34,7 +34,7 @@ def get_wechat_db(require_list: Union[List[str], str] = "all", msg_dir: str = No
|
||||
msg_dir = os.path.join(w_dir, "WeChat Files")
|
||||
|
||||
if not os.path.exists(msg_dir):
|
||||
error = "[-] 目录不存在"
|
||||
error = f"[-] 目录不存在: {msg_dir}"
|
||||
if is_logging: print(error)
|
||||
return error
|
||||
|
||||
@ -63,7 +63,7 @@ def get_wechat_db(require_list: Union[List[str], str] = "all", msg_dir: str = No
|
||||
for require in require_list:
|
||||
pattern[require] = re.compile(r"%s.*\.db$" % require)
|
||||
else:
|
||||
error = "[-] 参数错误"
|
||||
error = f"[-] 参数错误: {require_list}"
|
||||
if is_logging: print(error)
|
||||
return error
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user