From d38b63a483deb0186828e82e09c4c650eb672d54 Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Thu, 17 Mar 2022 09:38:02 +0530 Subject: [PATCH] fix: mkdir -p to ignore `OSError`s Closes https://github.com/frappe/bench/issues/1279 --- bench/utils/bench.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bench/utils/bench.py b/bench/utils/bench.py index 82a63bef..9f170ba1 100644 --- a/bench/utils/bench.py +++ b/bench/utils/bench.py @@ -174,8 +174,7 @@ def migrate_env(python, backup=False): from datetime import datetime parch = os.path.join(path, "archived", "envs") - if not os.path.exists(parch): - os.mkdir(parch) + os.makedirs(parch, exist_ok=True) source = os.path.join(path, "env") target = parch