def load_local_session(self):
# ????? Session ?????????????????
if self.__storage_path__ is not None:
# ??????????? Session ???????????????? Session ID
session_path_list = os.listdir(self.__storage_path__)
# ??????????
for session_id in session_path_list:
# ??????????
path = os.path.join(self.__storage_path__, session_id)
# ????????
with open(path, 'rb') as f:
content = f.read()
# ??????? base64 ??
content = base64.decodebytes(content)
# ? Session ID ???????????????????
self.__session_map__[session_id] = json.loads(content.decode())
# ??????????
评论列表
文章目录