瀏覽代碼

borg info:fixed bug when called without arguments,issue #1914

OEM Configuration (temporary user) 8 年之前
父節點
當前提交
0f07b6acf4
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/borg/archiver.py

+ 1 - 1
src/borg/archiver.py

@@ -2192,7 +2192,7 @@ class Archiver:
                                           formatter_class=argparse.RawDescriptionHelpFormatter,
                                           help='show repository or archive information')
         subparser.set_defaults(func=self.do_info)
-        subparser.add_argument('location', metavar='REPOSITORY_OR_ARCHIVE',
+        subparser.add_argument('location', metavar='REPOSITORY_OR_ARCHIVE', nargs='?', default='',
                                type=location_validator(),
                                help='archive or repository to display information about')
         self.add_archives_filters_args(subparser)