Skip to content

Commit

Permalink
Merge pull request #3724 from hs0210/utils_disk
Browse files Browse the repository at this point in the history
utils_disk: Fix regexp for getting first nvme disk
  • Loading branch information
dzhengfy authored Jul 25, 2023
2 parents e20d6f4 + a26a944 commit 9742b58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion virttest/utils_disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,7 @@ def get_first_disk(session=None):
first_disk = ""
disks = get_parts_list(session=session)
for disk in disks:
pattern = re.compile('[0-9]+')
pattern = re.compile('p[0-9]+') if 'nvme' in disk else re.compile('[0-9]+')
if not pattern.findall(disk):
first_disk = disk
break
Expand Down

0 comments on commit 9742b58

Please sign in to comment.