Fix addon_utils.check

Second return value could be None instead of False.
This commit is contained in:
Campbell Barton 2015-06-14 21:04:51 +10:00
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 "