From c5e7788a9a9737ecaa1971f2b7b45052663275cd Mon Sep 17 00:00:00 2001 From: Naresh Bannoth Date: Sun, 8 Sep 2024 13:13:54 +0530 Subject: [PATCH] Fixing the command output not iterable error in nvme.py we see the command output was not splittable and non iterable error. so fixed here for same. Signed-off-by: Naresh Bannoth --- avocado/utils/nvme.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/avocado/utils/nvme.py b/avocado/utils/nvme.py index 84ae91895d..f9dc3902ec 100644 --- a/avocado/utils/nvme.py +++ b/avocado/utils/nvme.py @@ -138,8 +138,8 @@ def get_block_size(controller_name): if namespaces: namespace = namespaces[0] cmd = f"nvme id-ns /dev/{namespace}" - out = process.run(cmd, shell=True, ignore_status=True) - for line in out.splitlines: + out = process.run(cmd, shell=True, ignore_status=True).stdout_text + for line in str(out.splitlines): if "in use" in line: return pow(2, int(line.split()[4].split(":")[-1])) return 4096