The 'copy_file()' and 'copy_tree()' functions in util.py now have

meaningful return values: respectively, whether the copy was done, and
the list of files that were copied.  This meant some trivial changes in
core.py as well: the Command methods that mirror 'copy_file()' and
'copy_tree()' have to pass on their return values.
This commit is contained in:
Greg Ward 1999-05-02 21:42:05 +00:00
parent 0f72695da3
commit 884df454b2
2 changed files with 38 additions and 20 deletions

View file

@ -636,10 +636,10 @@ class Command:
preserve_mode=1, preserve_times=1, update=1, level=1):
"""Copy a file respecting verbose and dry-run flags."""
util.copy_file (infile, outfile,
preserve_mode, preserve_times,
update, self.distribution.verbose >= level,
self.distribution.dry_run)
return util.copy_file (infile, outfile,
preserve_mode, preserve_times,
update, self.distribution.verbose >= level,
self.distribution.dry_run)
def copy_tree (self, infile, outfile,
@ -648,10 +648,10 @@ class Command:
"""Copy an entire directory tree respecting verbose and dry-run
flags."""
util.copy_tree (infile, outfile,
preserve_mode, preserve_times, preserve_symlinks,
update, self.distribution.verbose >= level,
self.distribution.dry_run)
return util.copy_tree (infile, outfile,
preserve_mode,preserve_times,preserve_symlinks,
update, self.distribution.verbose >= level,
self.distribution.dry_run)
def make_file (self, infiles, outfile, func, args,