summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cloudinit/config/cc_yum_add_repo.py2
-rw-r--r--cloudinit/distros/gentoo.py2
-rw-r--r--tests/unittests/test_handler/test_handler_yum_add_repo.py7
3 files changed, 3 insertions, 8 deletions
diff --git a/cloudinit/config/cc_yum_add_repo.py b/cloudinit/config/cc_yum_add_repo.py
index f63e3e08..5c273825 100644
--- a/cloudinit/config/cc_yum_add_repo.py
+++ b/cloudinit/config/cc_yum_add_repo.py
@@ -58,8 +58,6 @@ def _format_repository_config(repo_id, repo_config):
def handle(name, cfg, _cloud, log, _args):
- if _cloud.distro.is_excluded(name):
- return
repos = cfg.get('yum_repos')
if not repos:
log.debug(("Skipping module named %s,"
diff --git a/cloudinit/distros/gentoo.py b/cloudinit/distros/gentoo.py
index e8778e15..0087908a 100644
--- a/cloudinit/distros/gentoo.py
+++ b/cloudinit/distros/gentoo.py
@@ -181,4 +181,4 @@ class Distro(distros.Distro):
def update_package_sources(self):
self._runner.run("update-sources", self.package_command,
- ["-u", "world", "--quiet"], freq=PER_INSTANCE)
+ ["-u", "world"], freq=PER_INSTANCE)
diff --git a/tests/unittests/test_handler/test_handler_yum_add_repo.py b/tests/unittests/test_handler/test_handler_yum_add_repo.py
index ddf0ef9c..8df592f9 100644
--- a/tests/unittests/test_handler/test_handler_yum_add_repo.py
+++ b/tests/unittests/test_handler/test_handler_yum_add_repo.py
@@ -2,7 +2,6 @@ from cloudinit import helpers
from cloudinit import util
from cloudinit.config import cc_yum_add_repo
-from cloudinit.distros import rhel
from tests.unittests import helpers
@@ -19,8 +18,6 @@ class TestConfig(helpers.FilesystemMockingTestCase):
def setUp(self):
super(TestConfig, self).setUp()
self.tmp = self.makeDir(prefix="unittest_")
- self.cloud = type('', (), {})()
- self.cloud.distro = rhel.Distro('test', {}, None)
def test_bad_config(self):
cfg = {
@@ -37,7 +34,7 @@ class TestConfig(helpers.FilesystemMockingTestCase):
},
}
self.patchUtils(self.tmp)
- cc_yum_add_repo.handle('yum_add_repo', cfg, self.cloud, LOG, [])
+ cc_yum_add_repo.handle('yum_add_repo', cfg, None, LOG, [])
self.assertRaises(IOError, util.load_file,
"/etc/yum.repos.d/epel_testing.repo")
@@ -55,7 +52,7 @@ class TestConfig(helpers.FilesystemMockingTestCase):
},
}
self.patchUtils(self.tmp)
- cc_yum_add_repo.handle('yum_add_repo', cfg, self.cloud, LOG, [])
+ cc_yum_add_repo.handle('yum_add_repo', cfg, None, LOG, [])
contents = util.load_file("/etc/yum.repos.d/epel_testing.repo")
contents = configobj.ConfigObj(StringIO(contents))
expected = {