From df81dcb14555f965e66c7ee8b9400ba384aaf2fd Mon Sep 17 00:00:00 2001 From: Sean Breckenridge Date: Sun, 16 May 2021 16:19:22 -0700 Subject: [PATCH] mkdir with exist_ok flag --- my/core/core_config.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/my/core/core_config.py b/my/core/core_config.py index 76d19a8..cc8b527 100644 --- a/my/core/core_config.py +++ b/my/core/core_config.py @@ -82,8 +82,7 @@ class Config(user_config): else: tpath = Path(tdir) tpath = tpath.expanduser() - if not tpath.exists(): - tpath.mkdir(parents=True) + tpath.mkdir(parents=True, exist_ok=True) return tpath def _is_module_active(self, module: str) -> Optional[bool]: