Supports initialization of Module subclasses
@@ -162,6 +162,12 @@ class Module(object):
directory = module_dir
module = cls.init_with_directory(directory=directory, **kwargs)
CacheUpdater("update_cache", module.name, module.version).start()
+ else:
+ if not name and not directory:
+ directory = os.path.dirname(
+ sys.modules[cls.__module__].__file__)
+ module = Module.init_with_directory(
+ directory=directory, **kwargs)
else:
module = object.__new__(cls)
