quiet error installing an addon when the directory already exists (would happen on OSX frequently),

the addon would install but error was misleading.
This commit is contained in:
Campbell Barton 2013-08-20 14:43:01 +00:00
parent 5be5ad039d
commit b1a0dc6630

@ -1762,12 +1762,12 @@ class WM_OT_addon_install(Operator):
self.report({'ERROR'}, "Failed to get addons path")
return {'CANCELLED'}
# create dir is if missing.
try:
os.makedirs(path_addons, exist_ok=True)
except:
import traceback
traceback.print_exc()
if not os.path.isdir(path_addons):
try:
os.makedirs(path_addons, exist_ok=True)
except:
import traceback
traceback.print_exc()
# Check if we are installing from a target path,
# doing so causes 2+ addons of same name or when the same from/to