This is an automated email from the ASF dual-hosted git repository.

michaelsmolina pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 00f1fdb3c4 fix: os.makedirs race condition (#33161)
00f1fdb3c4 is described below

commit 00f1fdb3c44df12e62a289530af78845ddbb7845
Author: Jacob Amrany <[email protected]>
AuthorDate: Thu Apr 17 11:09:44 2025 -0700

    fix: os.makedirs race condition (#33161)
---
 superset/initialization/__init__.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/superset/initialization/__init__.py 
b/superset/initialization/__init__.py
index 7da7a23537..4022c653ff 100644
--- a/superset/initialization/__init__.py
+++ b/superset/initialization/__init__.py
@@ -88,8 +88,7 @@ class SupersetAppInitializer:  # pylint: 
disable=too-many-public-methods
         """
         wtforms_json.init()
 
-        if not os.path.exists(self.config["DATA_DIR"]):
-            os.makedirs(self.config["DATA_DIR"])
+        os.makedirs(self.config["DATA_DIR"], exist_ok=True)
 
     def post_init(self) -> None:
         """

Reply via email to