From 95e4ddce51963d7ff832a644e36e1c932d7b50b5 Mon Sep 17 00:00:00 2001 From: Shuhei Matsumoto Date: Tue, 18 Oct 2022 02:22:56 +0900 Subject: [PATCH] python/rpc: Change num arg to default for bdev_error_injection_error If we add default arguments to the bdev_error_injection_error RPC, it causes a syntax error, non-default argument follows default argument. The RPC handler initializes the value of the num argument to be 1 if it is omitted. Hence, the RPC client can make the num argument from non-default to default by removing =1. Otherwise, we have to insert new default argument before the num argument. Signed-off-by: Shuhei Matsumoto Change-Id: I0eb009ff3c0c5078f2afc4fa15e9ac97feeb0846 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15023 Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Aleksey Marchuk Reviewed-by: Changpeng Liu Reviewed-by: Krzysztof Karas Reviewed-by: Pawel Piatek --- python/spdk/rpc/bdev.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/spdk/rpc/bdev.py b/python/spdk/rpc/bdev.py index c0857d32d..333a2dc25 100644 --- a/python/spdk/rpc/bdev.py +++ b/python/spdk/rpc/bdev.py @@ -1505,7 +1505,7 @@ def bdev_get_histogram(client, name): return client.call('bdev_get_histogram', params) -def bdev_error_inject_error(client, name, io_type, error_type, num=1): +def bdev_error_inject_error(client, name, io_type, error_type, num): """Inject an error via an error bdev. Args: