Merge #146 [live-media] Properly calculate iso dir

This commit is contained in:
Dennis Gilmore 2016-02-11 13:07:30 +00:00
commit 96489a1e78
2 changed files with 4 additions and 4 deletions

View File

@ -170,10 +170,10 @@ class LiveMediaThread(WorkerThread):
linker = Linker(logger=compose._logger)
link_type = compose.conf.get("link_type", "hardlink-or-copy")
for image_info in image_infos:
image_dir = compose.paths.compose.iso_dir(variant) % {"arch": image_info['arch']}
image_dir = compose.paths.compose.iso_dir(image_info['arch'], variant)
makedirs(image_dir)
relative_image_dir = (
compose.paths.compose.iso_dir(variant, relative=True) % {"arch": image_info['arch']}
compose.paths.compose.iso_dir(image_info['arch'], variant, relative=True)
)
# let's not change filename of koji outputs

View File

@ -36,8 +36,8 @@ class _DummyCompose(object):
side_effect=lambda arch, variant, create_dir=False: os.path.join('/repo', arch, variant.uid)
),
iso_dir=mock.Mock(
side_effect=lambda variant, relative=False: os.path.join(
'' if relative else '/', 'iso_dir', variant.uid, '%(arch)s'
side_effect=lambda arch, variant, relative=False: os.path.join(
'' if relative else '/', 'iso_dir', variant.uid, arch
)
)
),