Fixed bad ehpemeral0 first partition detection (LP: #1236594)
This commit is contained in:
@@ -222,9 +222,6 @@ def devnode_for_dev_part(device, partition):
|
||||
if not os.path.exists(device):
|
||||
return None
|
||||
|
||||
if not partition:
|
||||
return device
|
||||
|
||||
short_name = os.path.basename(device)
|
||||
sys_path = "/sys/block/%s" % short_name
|
||||
|
||||
@@ -239,7 +236,7 @@ def devnode_for_dev_part(device, partition):
|
||||
|
||||
if partition is None:
|
||||
valid_mappings = [sys_long_path + "1",
|
||||
sys_long_path + "p1" % partition]
|
||||
sys_long_path + "p1"]
|
||||
elif partition != "0":
|
||||
valid_mappings = [sys_long_path + "%s" % partition,
|
||||
sys_long_path + "p%s" % partition]
|
||||
|
||||
Reference in New Issue
Block a user