From 04138eea3d60ffcbe81d48e5cf11d65f96c9a766 Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Tue, 12 Jul 2011 23:26:34 +0200 Subject: [PATCH] lang: fix invalid module resolution crash due to recent change of importing --- kivy/lang.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kivy/lang.py b/kivy/lang.py index 4c2a5e9f0..d785dcbe8 100644 --- a/kivy/lang.py +++ b/kivy/lang.py @@ -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('')