gather: Remove handling of impossible state

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ář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2017-04-28 12:24:50 +02:00
parent 834445e7d0
commit c784dab4aa
2 changed files with 0 additions and 11 deletions

View File

@ -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

View File

@ -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',