Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaia Clary <gaia.clary@machinimatrix.org>2012-10-19 12:51:31 +0400
committerGaia Clary <gaia.clary@machinimatrix.org>2012-10-19 12:51:31 +0400
commit9d1873154fe0763900a41eb2248f6a89cbdc1a26 (patch)
tree79127fdf1eaaeff62d941e0fde56a48b0179c2de /release/scripts/startup/bl_operators/wm.py
parentcf4f4e8a9ba973a22d832b9babb8e7b9d34a6e28 (diff)
[#32921] Fix: Python error triggered when installing an addon via 'install addon' button
Diffstat (limited to 'release/scripts/startup/bl_operators/wm.py')
-rw-r--r--release/scripts/startup/bl_operators/wm.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index 21cd2b47f71..61959c1a789 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -1755,6 +1755,7 @@ 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:
@@ -1784,6 +1785,7 @@ class WM_OT_addon_install(Operator):
return {'CANCELLED'}
else:
+ is_archive = False
path_dest = os.path.join(path_addons, os.path.basename(pyfile))
if self.overwrite:
@@ -1823,9 +1825,19 @@ class WM_OT_addon_install(Operator):
bpy.utils.refresh_script_paths()
# print message
- msg = "File %r installed into %r\n" % (pyfile, path_dest)
- self.report({'INFO'}, msg)
+ msg = "Modules Installed from %r:" % (pyfile)
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'}