mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-26 01:37:20 +00:00
force --no to be at the start of option
This commit is contained in:
parent
5be060d1f1
commit
9b1ca5c1eb
1 changed files with 1 additions and 1 deletions
|
@ -772,7 +772,7 @@ class ToggleAction(argparse.Action):
|
||||||
"""
|
"""
|
||||||
def __call__(self, parser, ns, values, option):
|
def __call__(self, parser, ns, values, option):
|
||||||
"""set the given flag to true unless ``--no`` is passed"""
|
"""set the given flag to true unless ``--no`` is passed"""
|
||||||
setattr(ns, self.dest, not '--no' in option)
|
setattr(ns, self.dest, option.startswith('--no-'))
|
||||||
|
|
||||||
subparser = subparsers.add_parser('create', parents=[common_parser],
|
subparser = subparsers.add_parser('create', parents=[common_parser],
|
||||||
description=self.do_create.__doc__,
|
description=self.do_create.__doc__,
|
||||||
|
|
Loading…
Reference in a new issue