From ca87c02e074d6861e18e3aa95c9420de8a2db4d9 Mon Sep 17 00:00:00 2001 From: caiwx86 Date: Tue, 14 Feb 2023 06:12:15 +0800 Subject: [PATCH] fix --- utils/comic/ComicInfo.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/utils/comic/ComicInfo.py b/utils/comic/ComicInfo.py index f763064..a6d6226 100644 --- a/utils/comic/ComicInfo.py +++ b/utils/comic/ComicInfo.py @@ -345,7 +345,7 @@ class comicInfo(): #文件保存 @classmethod - def file_save(cls,path,data,mode=None): + def file_save(cls,path,data,mode=None,print_msg=False): result = {} f = {} dir_name = os.path.dirname(path) @@ -362,7 +362,8 @@ class comicInfo(): f = open(save_path, mode, encoding="utf-8") f.write(data) f.close() - print("data=",data) + if print_msg: + print("data=",data) result = path + "文件写入成功" except: result = path + "文件写入失败"