From 8f4aed76ec105a361e513a108ca4b02ba9f21d2f Mon Sep 17 00:00:00 2001 From: jlhu4 <ljhu4@iflytek.com> Date: Thu, 14 Sep 2023 17:44:05 +0800 Subject: [PATCH] fix bug --- sample/ne_utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sample/ne_utils.py b/sample/ne_utils.py index 412a8d0..7335970 100644 --- a/sample/ne_utils.py +++ b/sample/ne_utils.py @@ -38,6 +38,9 @@ def del_file(filepath): :param filepath: 路径 :return: """ + if not os.path.exists(filepath): + print(f"路径 {filepath} 不存在,无需删除。") + return del_list = os.listdir(filepath) for f in del_list: file_path = os.path.join(filepath, f)