Ticket #215 (assigned defect)

Opened 8 months ago

Last modified 7 months ago

log the usage of shutil.copytree() instead of a cp subprocess

Reported by: zooko Assigned to: warner (accepted)
Priority: major Milestone: 0.8.0
Component: other Version: 0.7.6
Keywords: Cc:

Description

    def doCopy(self, res):
        # now copy tree to workdir
        fromdir = os.path.join(self.builder.basedir, self.srcdir)
        todir = os.path.join(self.builder.basedir, self.workdir)
        if runtime.platformType != "posix":
            self.sendStatus({'header': "Since we're on a non-POSIX platform, we're not going to try to execute cp in a subprocess, but instead 
use shutil.copytree(), which will block until it is complete.  fromdir: %s, todir: %s\n" % (fromdir, todir)})
            shutil.copytree(fromdir, todir)
            return defer.succeed(0)
        command = ['cp', '-r', '-p', fromdir, todir]
        c = ShellCommand(self.builder, command, self.builder.basedir,
                         sendRC=False, timeout=self.timeout)

Change History

04/28/08 15:35:43 changed by warner

  • status changed from new to assigned.
  • milestone changed from undecided to 0.7.8.

seems reasonable