[f22-branch 1/1] Use imgutils.copytree instead of shutil (#1221878)
bcl
installerbot-noreply at redhat.com
Tue May 26 20:52:14 UTC 2015
From: "Brian C. Lane" <bcl at redhat.com>
Sometimes the directory is already there, we just want to copy things
into it, so use our copytree.
---
src/sbin/livemedia-creator | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/sbin/livemedia-creator b/src/sbin/livemedia-creator
index 699d23c..99913d6 100755
--- a/src/sbin/livemedia-creator
+++ b/src/sbin/livemedia-creator
@@ -56,7 +56,7 @@ from pylorax.treebuilder import findkernels
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, mkqcow2, mktar, mkrootfsimg
+from pylorax.imgutils import mksquashfs, mkqcow2, mktar, mkrootfsimg, copytree
from pylorax.executils import execWithRedirect, execWithCapture, runcmd
# no-virt mode doesn't need libvirt, so make it optional
@@ -693,7 +693,7 @@ def make_livecd(opts, mount_dir, work_dir):
fullpath = joinpaths(mount_dir, configdir_path)
if os.path.exists(fullpath):
remove(fullpath)
- shutil.copytree(configdir, fullpath)
+ copytree(configdir, fullpath)
isolabel = opts.volid or "{0.name}-{0.version}-{1.basearch}".format(product, arch)
if len(isolabel) > 32:
@@ -1480,7 +1480,7 @@ def 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)
shutil.rmtree(result_dir)
log.info("SUMMARY")
--
To view this commit on github, visit https://github.com/rhinstaller/lorax/commit/8e2556474d5c3b135691571524604d25915f64a4
More information about the anaconda-patches
mailing list