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)
|
mod = __import__(package)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
mod = __import__('.'.join(package.split('.')[:-1]))
|
mod = __import__('.'.join(package.split('.')[:-1]))
|
||||||
|
# resolve the whole thing
|
||||||
|
for part in package.split('.')[1:]:
|
||||||
|
mod = getattr(mod, part)
|
||||||
else:
|
else:
|
||||||
mod = sys.modules[package]
|
mod = sys.modules[package]
|
||||||
# resolve the whole thing
|
|
||||||
for part in package.split('.')[1:]:
|
|
||||||
mod = getattr(mod, part)
|
|
||||||
global_idmap[alias] = mod
|
global_idmap[alias] = mod
|
||||||
except ImportError:
|
except ImportError:
|
||||||
Logger.exception('')
|
Logger.exception('')
|
||||||
|
|
Loading…
Reference in New Issue