diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-10-19 14:37:24 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-10-19 14:37:24 +0400 |
commit | b7642348e44c10710c0d3f65ccfdafdd964829a2 (patch) | |
tree | 09edba0201467e6e04c2e2f028bb3c857fbcdf0a /release/scripts/startup/bl_operators/wm.py | |
parent | 9d1873154fe0763900a41eb2248f6a89cbdc1a26 (diff) |
simplify addon install print, Now it only prints the source and destination dirs, with a list of addons added.
don't think its needed to print the full path of each addon.
also remove the __MACOX check, its harmless and people can make sure there zips dont have cruft in them before distributing them.
Diffstat (limited to 'release/scripts/startup/bl_operators/wm.py')
-rw-r--r-- | release/scripts/startup/bl_operators/wm.py | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index 61959c1a789..ac72b39a04d 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -1755,7 +1755,6 @@ class WM_OT_addon_install(Operator): #check to see if the file is in compressed format (.zip) if zipfile.is_zipfile(pyfile): - is_archive = True try: file_to_extract = zipfile.ZipFile(pyfile, 'r') except: @@ -1774,18 +1773,11 @@ class WM_OT_addon_install(Operator): try: # extract the file to "addons" file_to_extract.extractall(path_addons) - - # zip files can create this dir with metadata, don't need it - macosx_dir = os.path.join(path_addons, '__MACOSX') - if os.path.isdir(macosx_dir): - shutil.rmtree(macosx_dir) - except: traceback.print_exc() return {'CANCELLED'} else: - is_archive = False path_dest = os.path.join(path_addons, os.path.basename(pyfile)) if self.overwrite: @@ -1825,19 +1817,9 @@ class WM_OT_addon_install(Operator): bpy.utils.refresh_script_paths() # print message - msg = "Modules Installed from %r:" % (pyfile) + msg = "Modules Installed from %r into %r (%s)" % (pyfile, path_addons, ", ".join(sorted(addons_new))) print(msg) self.report({'INFO'}, msg) - for mod in addon_utils.modules(addon_utils.addons_fake_modules): - if mod.__name__ in addons_new: - info = addon_utils.module_bl_info(mod) - if is_archive: - module_path = os.path.dirname(os.path.abspath(mod.__file__)) - else: - module_path = os.path.abspath(mod.__file__) - msg = "\"%s\" installed in %r" % (info["name"],module_path) - self.report({'INFO'}, msg) - print(msg) return {'FINISHED'} |