[modify] change var place in initialization func

This commit is contained in:
gitea 2024-05-23 15:11:22 +08:00
parent a0f8f49b27
commit 6cb768a05e

View File

@ -266,6 +266,9 @@ def initialization():
# read init configurations from config file # read init configurations from config file
wb_conf = openpyxl.load_workbook('./configs.xlsx', read_only=True) wb_conf = openpyxl.load_workbook('./configs.xlsx', read_only=True)
ws_conf = wb_conf['brake'] ws_conf = wb_conf['brake']
except Exception as Err:
msg = "无法在当前路径下找到或打开【configs.xlsx】文件请确认"
warn_pause_exit(msg, 1, 2)
DATA_DIR = ws_conf.cell(row=2, column=2).value DATA_DIR = ws_conf.cell(row=2, column=2).value
AV = int(ws_conf.cell(row=3, column=2).value) AV = int(ws_conf.cell(row=3, column=2).value)
@ -273,9 +276,6 @@ def initialization():
RC = float(ws_conf.cell(row=5, column=2).value) RC = float(ws_conf.cell(row=5, column=2).value)
AXIS = ws_conf.cell(row=6, column=2).value AXIS = ws_conf.cell(row=6, column=2).value
wb_conf.close() wb_conf.close()
except Exception as Err:
msg = "无法在当前路径下找到或打开【configs.xlsx】文件请确认"
warn_pause_exit(msg, 1, 2)
raw_data_dirs, result_files = traversal_files(DATA_DIR) raw_data_dirs, result_files = traversal_files(DATA_DIR)
delete_excel_files(raw_data_dirs) delete_excel_files(raw_data_dirs)