From 6cb768a05e908c6b5b0ad394dbc105e920be226d Mon Sep 17 00:00:00 2001 From: gitea Date: Thu, 23 May 2024 15:11:22 +0800 Subject: [PATCH] [modify] change var place in initialization func --- rokae/brake/brake.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/rokae/brake/brake.py b/rokae/brake/brake.py index 911b860..392f0a0 100644 --- a/rokae/brake/brake.py +++ b/rokae/brake/brake.py @@ -266,17 +266,17 @@ def initialization(): # read init configurations from config file wb_conf = openpyxl.load_workbook('./configs.xlsx', read_only=True) ws_conf = wb_conf['brake'] - - DATA_DIR = ws_conf.cell(row=2, column=2).value - AV = int(ws_conf.cell(row=3, column=2).value) - RR = int(ws_conf.cell(row=4, column=2).value) - RC = float(ws_conf.cell(row=5, column=2).value) - AXIS = ws_conf.cell(row=6, column=2).value - wb_conf.close() except Exception as Err: msg = "无法在当前路径下找到或打开【configs.xlsx】文件,请确认!" warn_pause_exit(msg, 1, 2) + DATA_DIR = ws_conf.cell(row=2, column=2).value + AV = int(ws_conf.cell(row=3, column=2).value) + RR = int(ws_conf.cell(row=4, column=2).value) + RC = float(ws_conf.cell(row=5, column=2).value) + AXIS = ws_conf.cell(row=6, column=2).value + wb_conf.close() + raw_data_dirs, result_files = traversal_files(DATA_DIR) delete_excel_files(raw_data_dirs) check_files(raw_data_dirs, result_files)