Fix ssd detection for MMC devices.

This commit is contained in:
Ramon Buldó 2015-05-08 10:37:54 +02:00
parent 28695652fb
commit bbe06aa587

View File

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