def add(self, repo, pkg): """Split packages by repository """ if repo == "sbo": return pkg else: return split_package(pkg)[0]
def package_name(self, PACKAGES_TXT): """ Returns list with all the names of packages repository """ packages = [] try: for line in PACKAGES_TXT.splitlines(): if line.startswith("PACKAGE NAME:"): packages.append(split_package(line[14:].strip())[0]) return packages except KeyboardInterrupt: print("") sys.exit(0)