diff --git a/src/toolService.py b/src/toolService.py index 17f472683b8a4556e60c3a4889e0cf9a1ed07512..0942dfcec8df7807509f190b34a835d498e40bfc 100644 --- a/src/toolService.py +++ b/src/toolService.py @@ -38,12 +38,10 @@ class ToolService: def write_file(self, filename, content=""): """ 将内容写入文件。 - """ - try: - with open(filename, 'w') as f: - f.write(content) - except FileNotFoundError: - raise FileNotFoundError('The file is not exist') + """ + with open(filename, 'w') as f: + f.write(content) + def mkdirs(self, path): """