From 75b57ac25a36185240ffd62b5d3c81ce9ab946d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Mon, 22 Feb 2016 18:59:31 +0100 Subject: [PATCH] [live-images] Create image dir if needed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We can't copy an image to a non-existing directory. Signed-off-by: Lubomír Sedlář --- pungi/phases/live_images.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pungi/phases/live_images.py b/pungi/phases/live_images.py index 31c82797..5234951f 100644 --- a/pungi/phases/live_images.py +++ b/pungi/phases/live_images.py @@ -28,7 +28,7 @@ from productmd.images import Image from pungi.wrappers.kojiwrapper import KojiWrapper from pungi.wrappers.iso import IsoWrapper from pungi.phases.base import PhaseBase -from pungi.util import get_arch_variant_data, resolve_git_url +from pungi.util import get_arch_variant_data, resolve_git_url, makedirs from pungi.paths import translate_path @@ -129,6 +129,7 @@ class LiveImagesPhase(PhaseBase): elif type == 'appliance': dest_dir = self.compose.paths.compose.image_dir(variant, symlink_to=symlink_isos_to) dest_dir = dest_dir % {'arch': arch} + makedirs(dest_dir) else: raise RuntimeError('Unknown live image type %s' % type) if not dest_dir: