From ac241ab4412806e88f28f2219468b702ef0f500a Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Tue, 23 Feb 2016 15:52:39 +0700 Subject: [PATCH] ceph-disk: deactivate / destroy PATH arg are optional And the mandatory positional arguments need not be == 1, it is enough to leave the nargs parameter out. Signed-off-by: Loic Dachary --- src/ceph-disk/ceph_disk/main.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/ceph-disk/ceph_disk/main.py b/src/ceph-disk/ceph_disk/main.py index aa41d7f3b87..4f0f9e1362b 100755 --- a/src/ceph-disk/ceph_disk/main.py +++ b/src/ceph-disk/ceph_disk/main.py @@ -4284,7 +4284,6 @@ def make_activate_parser(subparsers): activate_parser.add_argument( 'path', metavar='PATH', - nargs=1, help='path to block device or directory', ) activate_parser.add_argument( @@ -4417,7 +4416,6 @@ def make_suppress_parser(subparsers): suppress_parser.add_argument( 'path', metavar='PATH', - nargs=1, help='path to block device or directory', ) suppress_parser.set_defaults( @@ -4430,7 +4428,6 @@ def make_suppress_parser(subparsers): unsuppress_parser.add_argument( 'path', metavar='PATH', - nargs=1, help='path to block device or directory', ) unsuppress_parser.set_defaults( @@ -4452,7 +4449,7 @@ def make_deactivate_parser(subparsers): deactivate_parser.add_argument( 'path', metavar='PATH', - nargs=1, + nargs='?', help='path to block device or directory', ) deactivate_parser.add_argument( @@ -4483,7 +4480,7 @@ def make_destroy_parser(subparsers): destroy_parser.add_argument( 'path', metavar='PATH', - nargs=1, + nargs='?', help='path to block device or directory', ) destroy_parser.add_argument(