瀏覽代碼

force --no to be at the start of option

Antoine Beaupré 9 年之前
父節點
當前提交
9b1ca5c1eb
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      borg/archiver.py

+ 1 - 1
borg/archiver.py

@@ -772,7 +772,7 @@ class Archiver:
             """
             def __call__(self, parser, ns, values, option):
                 """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],
                                           description=self.do_create.__doc__,