summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Howard <ben.howard@canonical.com>2013-10-07 15:15:20 -0600
committerBen Howard <ben.howard@canonical.com>2013-10-07 15:15:20 -0600
commit92b196693410b57e7d1f94eb557513b1aad177ff (patch)
treef9353ddc5281e820c1463437ba8cc4389014969e
parent4a5d0f589461fc933b9449660d6d6cf6fa40bff2 (diff)
downloadvyos-cloud-init-92b196693410b57e7d1f94eb557513b1aad177ff.tar.gz
vyos-cloud-init-92b196693410b57e7d1f94eb557513b1aad177ff.zip
Fixed bad ehpemeral0 first partition detection (LP: #1236594)
-rw-r--r--cloudinit/config/cc_mounts.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/cloudinit/config/cc_mounts.py b/cloudinit/config/cc_mounts.py
index 84ec928f..729110d7 100644
--- a/cloudinit/config/cc_mounts.py
+++ b/cloudinit/config/cc_mounts.py
@@ -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]