diff options
| author | Éric Araujo <merwok@netwok.org> | 2011-11-15 10:43:20 (GMT) |
|---|---|---|
| committer | Éric Araujo <merwok@netwok.org> | 2011-11-15 10:43:20 (GMT) |
| commit | 4d1554650475cc9a2c2773d6758687f4b3542de9 (patch) | |
| tree | 90440373b540b9097ae6c9116992243b4dd75941 /Lib/packaging/command/cmd.py | |
| parent | 9b5c7f44fad8fd78c23826218c6e7b425c06b183 (diff) | |
| download | cpython-4d1554650475cc9a2c2773d6758687f4b3542de9.zip cpython-4d1554650475cc9a2c2773d6758687f4b3542de9.tar.gz cpython-4d1554650475cc9a2c2773d6758687f4b3542de9.tar.bz2 | |
Remove obsolete verbose arguments from packaging.
Logging replaces verbose arguments. I haven’t fixed the example in
Doc/install/install.rst because I have major fixes and changes to the
oc under way and will fix or remove that example as part of that task.
Diffstat (limited to 'Lib/packaging/command/cmd.py')
| -rw-r--r-- | Lib/packaging/command/cmd.py | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/Lib/packaging/command/cmd.py b/Lib/packaging/command/cmd.py index 333b99d..25e6a72 100644 --- a/Lib/packaging/command/cmd.py +++ b/Lib/packaging/command/cmd.py @@ -351,7 +351,7 @@ class Command: def execute(self, func, args, msg=None, level=1): util.execute(func, args, msg, dry_run=self.dry_run) - def mkpath(self, name, mode=0o777, dry_run=None, verbose=0): + def mkpath(self, name, mode=0o777, dry_run=None): if dry_run is None: dry_run = self.dry_run name = os.path.normpath(name) @@ -367,9 +367,11 @@ class Command: def copy_file(self, infile, outfile, preserve_mode=True, preserve_times=True, link=None, level=1): - """Copy a file respecting verbose, dry-run and force flags. (The - former two default to whatever is in the Distribution object, and - the latter defaults to false for commands that don't define it.)""" + """Copy a file respecting dry-run and force flags. + + (dry-run defaults to whatever is in the Distribution object, and + force to false for commands that don't define it.) + """ if self.dry_run: # XXX add a comment return @@ -380,11 +382,13 @@ class Command: def copy_tree(self, infile, outfile, preserve_mode=True, preserve_times=True, preserve_symlinks=False, level=1): - """Copy an entire directory tree respecting verbose, dry-run, + """Copy an entire directory tree respecting dry-run and force flags. """ if self.dry_run: - return # see if we want to display something + # XXX should not return but let copy_tree log and decide to execute + # or not based on its dry_run argument + return return util.copy_tree(infile, outfile, preserve_mode, preserve_times, preserve_symlinks, not self.force, dry_run=self.dry_run) @@ -392,7 +396,7 @@ class Command: def move_file(self, src, dst, level=1): """Move a file respecting the dry-run flag.""" if self.dry_run: - return # XXX log ? + return # XXX same thing return move(src, dst) def spawn(self, cmd, search_path=True, level=1): |
