Skip to content

Commit

Permalink
Merge pull request avocado-framework#6024 from Naresh-ibm/nvme_block_…
Browse files Browse the repository at this point in the history
…size

Fixing the command output not iterable error in nvme.py
  • Loading branch information
richtja committed Sep 9, 2024
2 parents a2e1ca5 + c5e7788 commit b00cf3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions avocado/utils/nvme.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b00cf3e

Please sign in to comment.