From 5e227d96476cbb07b81a47fa60331ebc0345dfe6 Mon Sep 17 00:00:00 2001 From: CMHopeSunshine <277073121@qq.com> Date: Sun, 19 Jun 2022 22:39:28 +0800 Subject: [PATCH] fix bug --- Paimon_Exchange/data_source.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Paimon_Exchange/data_source.py b/Paimon_Exchange/data_source.py index b825e6c..e71f90b 100644 --- a/Paimon_Exchange/data_source.py +++ b/Paimon_Exchange/data_source.py @@ -186,6 +186,7 @@ async def exchange_action(info): @driver.on_startup async def _(): path = Path() / 'data' / 'LittlePaimon' / 'myb_exchange' + path.mkdir(parents=True, exist_ok=True) for exchange_data in path.iterdir(): info = load_json(path=exchange_data) t = str(exchange_data).replace('data\\LittlePaimon\\myb_exchange\\', '').replace('data/LittlePaimon/myb_exchange/', '').replace( @@ -204,6 +205,7 @@ async def _(): def get_exchange_info(user_id): result = '' path = Path() / 'data' / 'LittlePaimon' / 'myb_exchange' + path.mkdir(parents=True, exist_ok=True) i = 1 for exchange_data in path.iterdir(): file_name = str(exchange_data).replace('data\\LittlePaimon\\myb_exchange\\', '').replace('data/LittlePaimon/myb_exchange/', '') @@ -220,6 +222,7 @@ def get_exchange_info(user_id): def delete_exchange_info(user_id): path = Path() / 'data' / 'LittlePaimon' / 'myb_exchange' + path.mkdir(parents=True, exist_ok=True) for exchange_data in path.iterdir(): file_name = str(exchange_data).replace('data\\LittlePaimon\\myb_exchange\\', '').replace('data/LittlePaimon/myb_exchange/', '') if file_name.startswith(user_id):