summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/proxy/lazyimport.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pym/portage/proxy/lazyimport.py b/pym/portage/proxy/lazyimport.py
index b5d15931b..d878b7adc 100644
--- a/pym/portage/proxy/lazyimport.py
+++ b/pym/portage/proxy/lazyimport.py
@@ -199,7 +199,11 @@ def lazyimport(scope, *args):
try:
scope[alias] = getattr(already_imported, attr_name)
except AttributeError:
- raise ImportError('cannot import name %s' % attr_name)
+ # Apparently the target module is only partially
+ # imported, so create a proxy.
+ already_imported = None
+ scope[alias] = \
+ _LazyImportFrom(scope, name, attr_name, alias)
else:
scope[alias] = \
_LazyImportFrom(scope, name, attr_name, alias)