Code review changes

This commit is contained in:
Andres Caicedo
2023-04-09 15:39:11 +02:00
parent 54cbf1cae1
commit 011699e6a1
18 changed files with 28 additions and 98 deletions

View File

@@ -36,10 +36,8 @@ def write_to_file(filename, text):
try:
filepath = safe_join(working_directory, filename)
directory = os.path.dirname(filepath)
if not os.path.exists(directory):
os.makedirs(directory)
with open(filepath, "w") as f:
f.write(text)
return "File written to successfully."