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
|
@ -116,6 +116,10 @@ class ModuleBase:
|
|||
modname = 'kivy.modules.{0}'.format(name)
|
||||
module = __import__(name=modname)
|
||||
module = sys.modules[modname]
|
||||
except ImportError:
|
||||
try:
|
||||
module = __import__(name=name)
|
||||
module = sys.modules[name]
|
||||
except ImportError:
|
||||
Logger.exception('Modules: unable to import <%s>' % name)
|
||||
raise
|
||||
|
|
Loading…
Reference in New Issue