[Bf-blender-cvs] [92a56bbe6a9] master: Fix T73798: Error raising exception for local shutil.copytree
Campbell Barton
noreply at git.blender.org
Sat Feb 15 00:41:22 CET 2020
Commit: 92a56bbe6a985905ab748c29f57ab89977e83f9f
Author: Campbell Barton
Date: Sat Feb 15 10:40:43 2020 +1100
Branches: master
https://developer.blender.org/rB92a56bbe6a985905ab748c29f57ab89977e83f9f
Fix T73798: Error raising exception for local shutil.copytree
===================================================================
M release/scripts/startup/bl_operators/userpref.py
===================================================================
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 = []
More information about the Bf-blender-cvs
mailing list