tests: Stop overwriting modulesdir for DNF

Tests are not passing in Fedora builds with this code, since it was
deleted in DNF. I think it's not actually doing anything, so we should
be able to drop it as well.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2019-03-26 14:08:21 +01:00
parent 5f8b519941
commit c2c36dc3c2

View File

@ -22,7 +22,6 @@ os.environ['PATH'] = '%s:%s' % (BINDIR, os.environ['PATH'])
from pungi.wrappers.pungi import PungiWrapper from pungi.wrappers.pungi import PungiWrapper
try: try:
from dnf import __version__ as dnf_version
from pungi.dnf_wrapper import DnfWrapper, Conf from pungi.dnf_wrapper import DnfWrapper, Conf
from pungi.gather_dnf import Gather, GatherOptions, PkgFlag from pungi.gather_dnf import Gather, GatherOptions, PkgFlag
HAS_DNF = True HAS_DNF = True
@ -1819,10 +1818,6 @@ class DNFDepsolvingTestCase(DepsolvingBase, unittest.TestCase):
conf = Conf(base_arch) conf = Conf(base_arch)
conf.persistdir = persistdir conf.persistdir = persistdir
conf.cachedir = self.cachedir conf.cachedir = self.cachedir
if int(dnf_version.split('.')[0]) < 3:
conf.modulesdir = os.path.join(persistdir, 'modules.d')
else:
conf.modulesdir._set(os.path.join(persistdir, 'modules.d'))
if exclude: if exclude:
conf.exclude = exclude conf.exclude = exclude
dnf = DnfWrapper(conf) dnf = DnfWrapper(conf)