From b5f321386491b99cc0da72fea6820aa074d49ba2 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Mon, 21 May 2018 13:28:47 -0700 Subject: [PATCH] scripts/rpc.py: fix construct_aio_bdev block_size param Block size is supposed to be optional, but it was missing the nargs setting that makes positional parameters actually optional. Change-Id: I8324caa956d8eaecd3ce207c9296151512b6ebea Signed-off-by: Daniel Verkamp Reviewed-on: https://review.gerrithub.io/411942 Tested-by: SPDK Automated Test System Reviewed-by: Jim Harris Reviewed-by: Ben Walker --- scripts/rpc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/rpc.py b/scripts/rpc.py index fe59e588c..941464469 100755 --- a/scripts/rpc.py +++ b/scripts/rpc.py @@ -135,7 +135,7 @@ if __name__ == "__main__": help='Add a bdev with aio backend') p.add_argument('filename', help='Path to device or file (ex: /dev/sda)') p.add_argument('name', help='Block device name') - p.add_argument('block_size', help='Block size for this bdev', type=int, default=argparse.SUPPRESS) + p.add_argument('block_size', help='Block size for this bdev', type=int, nargs='?', default=0) p.set_defaults(func=construct_aio_bdev) @call_cmd