Merge branch 'master' into dev

This commit is contained in:
Andres Caicedo
2023-04-04 10:37:42 +02:00
7 changed files with 135 additions and 56 deletions

View File

@@ -34,6 +34,9 @@ def write_to_file(filename, text):
"""Write text to a file"""
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."