From cac893d388386500278a2e75e28467c79da3a45f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 1 Nov 2023 13:27:09 +0100 Subject: [PATCH] Avoid race condition when making configuration directory of tryton (grafted from 3931dcea4c458a1c5ac5887d0e13b2cef9978cdd) --HG-- branch : 6.0 --- tryton/tryton/config.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tryton/tryton/config.py b/tryton/tryton/config.py index b9d091be70..748a6401c7 100644 --- a/tryton/tryton/config.py +++ b/tryton/tryton/config.py @@ -26,8 +26,7 @@ def get_config_dir(): __version__.rsplit('.', 1)[0]) -if not os.path.isdir(get_config_dir()): - os.makedirs(get_config_dir(), 0o700) +os.makedirs(get_config_dir(), mode=0o700, exist_ok=True) class ConfigManager(object):