From 5841df3090d0cca9c13e515ae15efccb9bfa4904 Mon Sep 17 00:00:00 2001 From: saten-private <38902911+saten-private@users.noreply.github.com> Date: Sat, 18 May 2024 05:24:32 +0900 Subject: [PATCH] Supports folder creation --- babyagi.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/babyagi.py b/babyagi.py index 9f1a9a76..9a5b0c19 100755 --- a/babyagi.py +++ b/babyagi.py @@ -1601,6 +1601,8 @@ def write_file(file_path: str, content: str): os.makedirs(os.path.dirname(file_path), exist_ok=True) with open(file_path, "w") as file: file.write(content) + except IsADirectoryError: + return except Exception as e: raise e