From 519930bc1112cdf7881fecce907381ce6374e74c Mon Sep 17 00:00:00 2001
From: zhaoqingang <zhaoqg0118@163.com>
Date: 星期二, 14 一月 2025 13:37:56 +0800
Subject: [PATCH] 文档出卷-未上传文件提示
---
app/utils/excelmerge/conformity.py | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/app/utils/excelmerge/conformity.py b/app/utils/excelmerge/conformity.py
index 3df2e86..fed5e19 100644
--- a/app/utils/excelmerge/conformity.py
+++ b/app/utils/excelmerge/conformity.py
@@ -2,8 +2,8 @@
import random
import shutil
import string
-from datetime import datetime
+from datetime import datetime
from openpyxl import load_workbook
@@ -65,17 +65,16 @@
template_excel.save(output_path)
template_excel.close()
- # 鍚堝苟瀹屾垚鍚庡垹闄ゆ棤鐢ㄦ枃浠�
- for filename in os.listdir(file_path):
- file_path_full = os.path.join(file_path, filename)
- try:
+ try:
+ for filename in os.listdir(file_path):
+ file_path_full = os.path.join(file_path, filename)
if os.path.isfile(file_path_full) or os.path.islink(file_path_full):
os.unlink(file_path_full)
elif os.path.isdir(file_path_full):
shutil.rmtree(file_path_full)
- os.rmdir(file_path)
- except Exception as e:
- print(f"鍒犻櫎鏂囦欢鏃跺彂鐢熼敊璇�: {e}")
+ os.rmdir(file_path)
+ except Exception as e:
+ print(f"鍒犻櫎鏂囦欢鏃跺彂鐢熼敊璇�: {e}")
return file_name
except Exception as e:
--
Gitblit v1.8.0