mirror of
https://github.com/python/cpython.git
synced 2025-10-17 04:08:28 +00:00
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:
parent
0f72695da3
commit
884df454b2
2 changed files with 38 additions and 20 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue