def _add_repo(self, name, enabled=True): """Add the DNF repo object.""" repo = Repo(name, self.dnf_manager._base.conf) self.dnf_manager._base.repos.add(repo) if enabled: repo.enable() return repo
def _add_repo(self, repo_id): """Add a mocked repo with the specified id.""" repo = Repo(repo_id, self.dnf_manager._base.conf) self.dnf_manager._base.repos.add(repo) return repo