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:
authorBastien Montagne <montagne29@wanadoo.fr>2019-03-18 12:36:50 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-03-18 12:38:12 +0300
commit8ecc4d4f160440bb287c06b457bfc147feaa6ee6 (patch)
tree0201dea59a087eb7f27f4c0a24f3b80850908737
parent3a8099c45c49bd125d3ff34b6b937aab367a9731 (diff)
Fix noisy console messages about unported add-ons by default.
* Make those single-line warning, there is really no reason to raise exception (i.e. error) for that. * Only show them when `--debug` option is set.
-rw-r--r--release/scripts/modules/addon_utils.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/release/scripts/modules/addon_utils.py b/release/scripts/modules/addon_utils.py
index f2e799f1760..6ee8e9aa227 100644
--- a/release/scripts/modules/addon_utils.py
+++ b/release/scripts/modules/addon_utils.py
@@ -365,11 +365,9 @@ def enable(module_name, *, default_set=False, persistent=False, handle_error=Non
# 1.1) fail when add-on is too old
# This is a temporary 2.8x migration check, so we can manage addons that are supported.
- try:
- if mod.bl_info.get("blender", (0, 0, 0)) < (2, 80, 0):
- raise Exception(f"Add-on '{module_name:s}' has not been upgraded to 2.8, ignoring")
- except Exception as ex:
- handle_error(ex)
+ if mod.bl_info.get("blender", (0, 0, 0)) < (2, 80, 0):
+ if _bpy.app.debug:
+ print(f"Warning: Add-on '{module_name:s}' has not been upgraded to 2.8, ignoring")
return None
# 2) try register collected modules