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.
This commit is contained in:
@@ -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
|
# 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.
|
# 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):
|
||||||
if mod.bl_info.get("blender", (0, 0, 0)) < (2, 80, 0):
|
if _bpy.app.debug:
|
||||||
raise Exception(f"Add-on '{module_name:s}' has not been upgraded to 2.8, ignoring")
|
print(f"Warning: Add-on '{module_name:s}' has not been upgraded to 2.8, ignoring")
|
||||||
except Exception as ex:
|
|
||||||
handle_error(ex)
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
# 2) try register collected modules
|
# 2) try register collected modules
|
||||||
|
Reference in New Issue
Block a user