mirror of https://github.com/kivy/kivy.git
Update kivy/modules/__init__.py
handle ImportError: try to import just by module name (in case it is user module, not kivy.modules.* one)
This commit is contained in:
parent
aad04cec86
commit
cd84e984b7
|
@ -117,8 +117,12 @@ class ModuleBase:
|
|||
module = __import__(name=modname)
|
||||
module = sys.modules[modname]
|
||||
except ImportError:
|
||||
Logger.exception('Modules: unable to import <%s>' % name)
|
||||
raise
|
||||
try:
|
||||
module = __import__(name=name)
|
||||
module = sys.modules[name]
|
||||
except ImportError:
|
||||
Logger.exception('Modules: unable to import <%s>' % name)
|
||||
raise
|
||||
# basic check on module
|
||||
if not hasattr(module, 'start'):
|
||||
Logger.warning('Modules: Module <%s> missing start() function' %
|
||||
|
|
Loading…
Reference in New Issue