From bf6210b3c79351e00852ef6c9dc665c1990ab158 Mon Sep 17 00:00:00 2001 From: Tomasz Kulasek Date: Fri, 11 Jan 2019 19:02:16 +0100 Subject: [PATCH] test/iscsi: fix support for python 3.6 in calsoft.py Value of output field in subprocess.CalledProcessError exception should be converted from 'bytes' to 'str' before write() operation. Change-Id: I010c9ddd75302294853b2bab3db1bf013660a465 Signed-off-by: Tomasz Kulasek Reviewed-on: https://review.gerrithub.io/c/440081 Tested-by: SPDK CI Jenkins Chandler-Test-Pool: SPDK Automated Test System Reviewed-by: Jim Harris Reviewed-by: Darek Stojaczyk --- test/iscsi_tgt/calsoft/calsoft.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/iscsi_tgt/calsoft/calsoft.py b/test/iscsi_tgt/calsoft/calsoft.py index d50d4c1b5..ad1e551f4 100755 --- a/test/iscsi_tgt/calsoft/calsoft.py +++ b/test/iscsi_tgt/calsoft/calsoft.py @@ -40,7 +40,7 @@ def run_case(case, result_list, log_dir_path): case_log = subprocess.check_output("{}/{}".format(CALSOFT_BIN_PATH, case), stderr=subprocess.STDOUT, shell=True).decode('utf-8') except subprocess.CalledProcessError as e: result_list.append({"Name": case, "Result": "FAIL"}) - case_log = e.output + case_log = e.output.decode('utf-8') else: result_list.append({"Name": case, "Result": "PASS"}) with open(log_dir_path + case + '.txt', 'w') as f: