From 92a56bbe6a985905ab748c29f57ab89977e83f9f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 15 Feb 2020 10:40:43 +1100 Subject: [PATCH] Fix T73798: Error raising exception for local shutil.copytree --- release/scripts/startup/bl_operators/userpref.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/release/scripts/startup/bl_operators/userpref.py b/release/scripts/startup/bl_operators/userpref.py index 4cb6ddd3fa3..b1bd879efa5 100644 --- a/release/scripts/startup/bl_operators/userpref.py +++ b/release/scripts/startup/bl_operators/userpref.py @@ -52,8 +52,10 @@ def module_filesystem_remove(path_base, module_name): # This duplicates shutil.copytree from Python 3.8, with the new dirs_exist_ok # argument that we need. Once we upgrade to 3.8 we can remove this. def _preferences_copytree(entries, src, dst): - import shutil import os + import shutil + from shutil import Error + os.makedirs(dst, exist_ok=True) errors = []