diff options
author | Tim Burke <tim.burke@gmail.com> | 2020-04-03 09:34:38 -0700 |
---|---|---|
committer | Tim Burke <tim.burke@gmail.com> | 2020-10-16 13:57:02 -0700 |
commit | 74c50dee2de1fdda0d58cc295a70c7ff7d1700e6 (patch) | |
tree | 8bd80b1a1d82919030ad3964c9a35f702327d0ed /swiftclient | |
parent | fcd8488ec455e43efaae86284820bad22e515b1b (diff) | |
download | python-swiftclient-74c50dee2de1fdda0d58cc295a70c7ff7d1700e6.tar.gz |
Have `delete --all` imply `--versions` for the CLI
Change-Id: Id5a6d4cef3d4ed76c897a099a62a4ba3ed8f8dab
Diffstat (limited to 'swiftclient')
-rwxr-xr-x | swiftclient/shell.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/swiftclient/shell.py b/swiftclient/shell.py index dbcd437..7c6f0f7 100755 --- a/swiftclient/shell.py +++ b/swiftclient/shell.py @@ -78,8 +78,8 @@ Positional arguments: for multiple objects. Optional arguments: - -a, --all Delete all containers and objects. - --versions Delete all versions + -a, --all Delete all containers and objects. Implies --versions. + --versions Delete all versions. --leave-segments Do not delete segments of manifest objects. -H, --header <header:value> Adds a custom request header to use for deleting @@ -132,6 +132,8 @@ def st_delete(parser, args, output_manager, return_parser=False): (options, args) = parse_args(parser, args) args = args[1:] + if options['yes_all']: + options['versions'] = True if (not args and not options['yes_all']) or (args and options['yes_all']): output_manager.error('Usage: %s delete %s\n%s', BASENAME, st_delete_options, |