From caec89289fd764922f621482acb94531d153b598 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Thu, 9 May 2019 22:46:59 -0700 Subject: [PATCH] scripts/rpc.py: allow empty lines when executing script This is a bit more flexible in case script accidentally has an extra newline at the end of the rpc.py input. Signed-off-by: Jim Harris Change-Id: I1ebf08681e5900a4817712c7b62e4d5c21d43e54 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453956 Tested-by: SPDK CI Jenkins Reviewed-by: Karol Latecki Reviewed-by: Shuhei Matsumoto Reviewed-by: Ben Walker --- scripts/rpc.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/rpc.py b/scripts/rpc.py index 57082974c..7bab8795e 100755 --- a/scripts/rpc.py +++ b/scripts/rpc.py @@ -1784,6 +1784,8 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse def execute_script(parser, client, fd): for rpc_call in map(str.rstrip, fd): + if not rpc_call.strip(): + continue args = parser.parse_args(shlex.split(rpc_call)) args.client = client call_rpc_func(args)