forked from bartvdbraak/blender
Fix addon_utils.check
Second return value could be None instead of False.
This commit is contained in:
parent
91b23992ce
commit
b9fe261255
@ -219,7 +219,8 @@ def check(module_name):
|
|||||||
loaded_default = module_name in _user_preferences.addons
|
loaded_default = module_name in _user_preferences.addons
|
||||||
|
|
||||||
mod = sys.modules.get(module_name)
|
mod = sys.modules.get(module_name)
|
||||||
loaded_state = mod and getattr(mod, "__addon_enabled__", Ellipsis)
|
loaded_state = ((mod is not None) and
|
||||||
|
getattr(mod, "__addon_enabled__", Ellipsis))
|
||||||
|
|
||||||
if loaded_state is Ellipsis:
|
if loaded_state is Ellipsis:
|
||||||
print("Warning: addon-module %r found module "
|
print("Warning: addon-module %r found module "
|
||||||
|
Loading…
Reference in New Issue
Block a user