From c2be4bdfc8ad3ff3c0a490fdbdf8640135c20f93 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Mon, 1 Aug 2016 14:12:02 -0700 Subject: [PATCH] livemedia-creator: Use imgutils.copytree for results (#1362157) commit 5da9f5c179fcf45c1ea3e9e577d87cd2e369eb57 cleaned up the resultdir handling, but didn't take into account that on master shutil.copytree was switched to imgutil.copytree which doesn't care if the empty directory exists or not. Resolves: rhbz#1362157 --- src/sbin/livemedia-creator | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sbin/livemedia-creator b/src/sbin/livemedia-creator index d436bbb3..f698bde2 100755 --- a/src/sbin/livemedia-creator +++ b/src/sbin/livemedia-creator @@ -56,6 +56,7 @@ from pylorax.sysutils import joinpaths, remove from pylorax.imgutils import PartitionMount, mksparse, mkext4img, loop_detach from pylorax.imgutils import get_loop_name, dm_detach, mount, umount, Mount from pylorax.imgutils import mksquashfs, mktar, mkrootfsimg, mkqcow2 +from pylorax.imgutils import copytree from pylorax.executils import execWithRedirect, execWithCapture, runcmd # no-virt mode doesn't need libvirt, so make it optional @@ -1349,7 +1350,7 @@ if __name__ == '__main__': umount(mounted_sysroot_boot_dir) if opts.result_dir != opts.tmp and result_dir: - shutil.copytree( result_dir, opts.result_dir ) + copytree(result_dir, opts.result_dir, preserve=False) shutil.rmtree( result_dir ) log.info("SUMMARY")