def pull_module(self, path, name, ver=""): module_path = os.path.join(self.__path, mmcommon.module_to_dir(name, ver)) if os.path.exists(module_path): dest = os.path.join(path, mmcommon.module_to_dir(name, ver)) mm_module_copy(module_path, dest) return True else: print("no module <" + name + ":" + ver + ">" + " in repo [" + self.__name + "]") return False
def have_module(self, name, ver=""): module_path = os.path.join(self.__path, mmcommon.module_to_dir(name, ver)) return os.path.exists(module_path)