fix a bug

This commit is contained in:
xtaodada 2022-09-04 00:08:35 +08:00
parent e5aa18dd81
commit c2233047b8
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

View File

@ -28,6 +28,7 @@ class Player:
def __init__(self, uid: str): def __init__(self, uid: str):
self.uid = uid self.uid = uid
self.time = 0 self.time = 0
self.all_char = []
if not exists(PLAYER_PATH / uid / f"{uid}.json"): if not exists(PLAYER_PATH / uid / f"{uid}.json"):
return return
with open(PLAYER_PATH / uid / f"{uid}.json", "r", encoding="utf-8") as fp: with open(PLAYER_PATH / uid / f"{uid}.json", "r", encoding="utf-8") as fp: