def get_module(self, module): for url in self.urls: LOG.info("url 0 [ %s ] , module [ %s ]" % (url[0], module)) if url[0] == module: LOG.debug("found it " + url[1]["target"]) module = _import(url[1]["target"]) return module else: LOG.error("not found module named %s in file setting" % module)
def search(self): search_path = self.root + "/*/*_setting.py" _p_path_list = glob.glob(search_path) if not _p_path_list: LOG.error("Not found any project in path " + self.root) return None for path in _p_path_list: LOG.debug("Add project " + path) self.projects.append(Project(path)) LOG.debug("Found %d project in path" % len(self.projects))