From c784dab4aae800a4e032b58837eebb31daee8c15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Fri, 28 Apr 2017 12:24:50 +0200 Subject: [PATCH] gather: Remove handling of impossible state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The get_system_release_packages function can never be called without a variant, so it makes no sense to check for that condition. Signed-off-by: Lubomír Sedlář --- pungi/phases/gather/__init__.py | 4 ---- tests/test_gather_phase.py | 7 ------- 2 files changed, 11 deletions(-) diff --git a/pungi/phases/gather/__init__.py b/pungi/phases/gather/__init__.py index 5ab81a68..c8551a79 100644 --- a/pungi/phases/gather/__init__.py +++ b/pungi/phases/gather/__init__.py @@ -450,10 +450,6 @@ def get_system_release_packages(compose, arch, variant, package_sets): packages = set() filter_packages = set() - if not variant: - # include all system-release-* (gathering for a package superset) - return packages, filter_packages - if not package_sets or not package_sets.get(arch, None): return packages, filter_packages diff --git a/tests/test_gather_phase.py b/tests/test_gather_phase.py index e40c5765..e953149e 100644 --- a/tests/test_gather_phase.py +++ b/tests/test_gather_phase.py @@ -277,13 +277,6 @@ class TestGetSystemRelease(unittest.TestCase): self.addon = helpers.MockVariant(uid='Server-HA', arches=['x86_64'], type='addon', parent=self.variant) - def test_no_variant(self): - # TODO remove this code - self.assertEqual( - gather.get_system_release_packages(self.compose, 'x86_64', None, mock.Mock()), - (set(), set()) - ) - def test_no_package_set(self): self.assertEqual( gather.get_system_release_packages(self.compose, 'x86_64',