Fix issue where virtual modules with the same name as the module

Were not being loaded
This commit is contained in:
Thomas S Hatch 2012-12-10 17:19:47 -07:00
parent 9564ac1629
commit 9dbd90a3e6

View File

@ -579,9 +579,7 @@ class Loader(object):
if hasattr(mod, '__virtual__'):
if callable(mod.__virtual__):
virtual = mod.__virtual__()
if virtual and module_name != virtual:
log.debug(('Loaded {0} as virtual '
'{1}').format(module_name, virtual))
if virtual:
# update the module name with the new name
module_name = virtual
else: