diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-08-20 18:43:01 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-08-20 18:43:01 +0400 |
commit | b1a0dc6630008286ce957501cd52e29fb57199c6 (patch) | |
tree | 72330a9f0f1fbb335178f0f967ff4618f6266e4a /release | |
parent | 5be5ad039d4de230d306069e25442324cc74b39b (diff) |
quiet error installing an addon when the directory already exists (would happen on OSX frequently),
the addon would install but error was misleading.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_operators/wm.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index 63d9aa31ddd..5095bfdd9d2 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -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 |