From 16153df2f053a112956ef3a401ff28d0e5b67306 Mon Sep 17 00:00:00 2001 From: PhilipWafula Date: Wed, 27 Oct 2021 11:43:35 +0300 Subject: [PATCH] Resolve creation of phone dir when it already exists. --- apps/data-seeding/common/dirs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/data-seeding/common/dirs.py b/apps/data-seeding/common/dirs.py index 1904ca52..b84d1be0 100644 --- a/apps/data-seeding/common/dirs.py +++ b/apps/data-seeding/common/dirs.py @@ -39,6 +39,6 @@ def initialize_dirs(user_dir, force_reset=False): for d in dirs.keys(): if d == 'old': continue - os.makedirs(dirs[d]) + os.makedirs(dirs[d], exist_ok=True) return dirs