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)