mirror of https://github.com/kivy/kivy.git
lang: fix invalid module resolution crash due to recent change of importing
This commit is contained in:
parent
eb52370e90
commit
04138eea3d
|
@ -527,11 +527,11 @@ class Parser(object):
|
|||
mod = __import__(package)
|
||||
except ImportError:
|
||||
mod = __import__('.'.join(package.split('.')[:-1]))
|
||||
# resolve the whole thing
|
||||
for part in package.split('.')[1:]:
|
||||
mod = getattr(mod, part)
|
||||
else:
|
||||
mod = sys.modules[package]
|
||||
# resolve the whole thing
|
||||
for part in package.split('.')[1:]:
|
||||
mod = getattr(mod, part)
|
||||
global_idmap[alias] = mod
|
||||
except ImportError:
|
||||
Logger.exception('')
|
||||
|
|
Loading…
Reference in New Issue