Support NVME device naming.

This commit is contained in:
Teo Mrnjavac 2016-06-17 15:57:38 +02:00
parent 4271cfda1f
commit 5a6bc95859

View File

@ -73,7 +73,7 @@ def disk_name_for_partition(partition):
"""
name = os.path.basename(partition["device"])
if name.startswith("/dev/mmcblk"):
if name.startswith("/dev/mmcblk") or name.startswith("/dev/nvme"):
return re.sub("p[0-9]+$", "", name)
return re.sub("[0-9]+$", "", name)