Skip to content

Commit 5841df3

Browse files
committed
Supports folder creation
1 parent efb7833 commit 5841df3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

babyagi.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1601,6 +1601,8 @@ def write_file(file_path: str, content: str):
16011601
os.makedirs(os.path.dirname(file_path), exist_ok=True)
16021602
with open(file_path, "w") as file:
16031603
file.write(content)
1604+
except IsADirectoryError:
1605+
return
16041606
except Exception as e:
16051607
raise e
16061608

0 commit comments

Comments
 (0)