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 <james.r.harris@intel.com> Change-Id: I1ebf08681e5900a4817712c7b62e4d5c21d43e54 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453956 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Karol Latecki <karol.latecki@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
c4f42bf953
commit
caec89289f
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user