demandimport: handle already-loaded nested modules in subload
authorBrendan Cully <brendan@kublai.com>
Sun, 17 Dec 2006 18:34:42 -0800
changeset 3923 de6ae8f016af
parent 3922 693eec9570f3
child 3924 a8bd7280330f
demandimport: handle already-loaded nested modules in subload
mercurial/demandimport.py
--- a/mercurial/demandimport.py
+++ b/mercurial/demandimport.py
@@ -51,7 +51,7 @@ class _demandmod(object):
                     h, t = p.split('.', 1)
                 if not hasattr(mod, h):
                     setattr(mod, h, _demandmod(p, mod.__dict__, mod.__dict__))
-                else:
+                elif t:
                     subload(getattr(mod, h), t)
 
             for x in after: